Preview hangs when opening any image or pdf
Solution 1:
Probably resetting Preview by deleting its configuration from ~/Library
could solve that problem.
cd ~/Library
rm Caches/com.apple.Preview \
Containers/com.apple.Preview \
Preferences/com.apple.Preview.LSSharedFileList.plist\
Preferences/com.apple.Preview.SandboxedPersistentURLs.LSSharedFileList.plist \
"Saved Application State"/com.apple.Preview.savedState
Restart Preview and test.
Solution 2:
I had the same issue on OS X 10.10.5, and removing only ~/Library/Containers/com.apple.Preview
was enough to solve.
tar czf ~/preview_cache.tgz ~/Library/Containers/com.apple.Preview/ # make a backup copy
rm -rf ~/Library/Containers/com.apple.Preview/
Then, run Preview again, and if the issue is solved, you can remove the backup:
rm ~/preview_cache.tgz