How to rebuild Photos Thumbnails (Previews)

My photos library (approx 30.000 images) works fine, without any problems displaying and editing the images.


But nearly 3000 of my images have lost there previews (thumbnails) perhaps because "cleaning" apps such as Onyx oder CleanMyMac has "helpfully" removed the extra "junk" from the photo library.

The missing photos previews are probably the reason for iCloud photo photo lib syncing problems, with I have additionally.


How can I rebuild all the thumbnails in my photos library ?

Is there any terminal command to start the rebuild ?

In the old iPhoto app there was a simple option to do this rebuilding job.


Thanks for any helpful advice.

Alexander

iMac, macOS High Sierra (10.13.5), 12GB RAM 27 Display

Posted on Jun 17, 2018 3:06 AM

Reply
Question marked as Top-ranking reply

Posted on Jun 17, 2018 3:28 AM

In some previous cases after damaging the Photos Library with CleanMyMac it helped to edit a photo without a thumbnail to recreate the thumbnail (I don't know what Onyx did to your library). Editing a photo creates a new thumbnail, provided the original image files have not been lost as well. The simplest way to edit several photos at once is to (How to Rebuild Thumbnails in a Photos Library)

  1. select a range of photos by selecting one photo, then holding down the Shift ⇧ key and clicking the last photo of the range.
  2. Now enter the key combination ⌘R to rate the photos. Wait for the rotation to finish.
  3. Now enter the key combination ⌥⌘R to rotate them back.


Test this first with a single photo, to see , if the thumbnail will reappear.


If the rotation trick does not suffice, run the library repair tool. But this will cause a completely new upload of your Photos Library to iCloud. Nad you need to make a recent backup of your Photos Library, before you run the repair tool. But do not overwrite any good backup of your library that you still may have. Fix missing or incorrect thumbnails in Photos - Apple Support

Regenerate missing thumbnails with library repair tool

If a large number of your pictures' thumbnails are missing, you can regenerate them with the Photos library repair tool:

  1. Quit Photos.
  2. Open Photos while pressing the Command and Option keys.
  3. Click Repair in the dialog that appears.

This process recreates thumbnails for all the master images stored in your Photos library.

Note: If you use iCloud Photo Library with Photos, this action will cause Photos to re-upload all your pictures.

Apple warns against using third-party applications to clean a Photos Library, just because of similar problems you encountered: Using third-party apps to remove duplicate photos might damage your Photos for macOS library - Apple Support

The previews, thumbnails, caches inside the library are essential for the media Browser and for the cloud processes.

Similar questions

7 replies
Question marked as Top-ranking reply

Jun 17, 2018 3:28 AM in response to alucky

In some previous cases after damaging the Photos Library with CleanMyMac it helped to edit a photo without a thumbnail to recreate the thumbnail (I don't know what Onyx did to your library). Editing a photo creates a new thumbnail, provided the original image files have not been lost as well. The simplest way to edit several photos at once is to (How to Rebuild Thumbnails in a Photos Library)

  1. select a range of photos by selecting one photo, then holding down the Shift ⇧ key and clicking the last photo of the range.
  2. Now enter the key combination ⌘R to rate the photos. Wait for the rotation to finish.
  3. Now enter the key combination ⌥⌘R to rotate them back.


Test this first with a single photo, to see , if the thumbnail will reappear.


If the rotation trick does not suffice, run the library repair tool. But this will cause a completely new upload of your Photos Library to iCloud. Nad you need to make a recent backup of your Photos Library, before you run the repair tool. But do not overwrite any good backup of your library that you still may have. Fix missing or incorrect thumbnails in Photos - Apple Support

Regenerate missing thumbnails with library repair tool

If a large number of your pictures' thumbnails are missing, you can regenerate them with the Photos library repair tool:

  1. Quit Photos.
  2. Open Photos while pressing the Command and Option keys.
  3. Click Repair in the dialog that appears.

This process recreates thumbnails for all the master images stored in your Photos library.

Note: If you use iCloud Photo Library with Photos, this action will cause Photos to re-upload all your pictures.

Apple warns against using third-party applications to clean a Photos Library, just because of similar problems you encountered: Using third-party apps to remove duplicate photos might damage your Photos for macOS library - Apple Support

The previews, thumbnails, caches inside the library are essential for the media Browser and for the cloud processes.

Jun 17, 2018 4:42 AM in response to alucky

Strangely the rest of the photos did not rotate, they are "unrotatetable". Do you know the reason for this behavior ?

That usually means, that the original image file cannot be accessed, perhaps because of the problem with iCloud syncing, or because the original file is missing completely.


Make a test, if the original image file still exist by trying to export one of the problematic photos with "File > Export > Export unmodified original". Can the original be exported?



Are all of your photos currently in iCloud? Can you see the problematic photos on your iCloud web page at www.icloudcom, when you launch the Photos.app there?

If all your photos and videos are in iCloud, you could restore your Photos Library from iCloud.

  • Make a backup copy of your current library on an external drive.
  • Create a new, empty Photos Library on your system drive. Make this empty library your System Photo Library and enable it for iCloud.
  • Wait, for all photos to sync back from iCloud to the new library. You should now have a restored, new library. Only, all projects will be missing, so need the backup copy of your current library to be able to access your projects.

Jun 17, 2018 5:36 AM in response to alucky

Then you could restore the photos by exporting and reimporting the originals. But it will be a lot of work to copy and paste the adjustments and metadata back onto the reimported 3000 images.


Photos has only the one repair tool that you already tried did not help to repair the damage.

You have two options:

  • Restore the library from the last backup you made, before you ran CleanMyMac and Onyx, and then reimport all photos that you added after this backup has been made.
  • or fix all 3000 photos manually and hope that the library does not have any further hidden damage.

I would not trust the library any longer, if the repair tool failed. That is indicating that the damage is beyond repair.


, I disabled iCloud syncing. So the complete photos library is only on my iMac ! 165 GB size

Did you just disable the syncing or delete the library from iCloud completely?

If the iCloud version is newer than the last reliable backup, I would still restore from iCloud. It will be quicker than uploading and syncing a library from your backups.

Jun 17, 2018 12:05 PM in response to alucky

Do you know if Photos exports the metadata, so I can reimport the problematic photos.

  • To save the metadata on export: Use "File > Export > Export unmodified originals" to export the high quality originals. Enable "Export IPTC as XMP". This will create a sidecar file with the metadata. If you import the originals with this XMP sidecar present in the same folder, Photos can restore the IPTC metadata from this file, when you import the exported originals to your other library.
  • User uploaded file


Photos does not have any other repair tools, and I have not heard about any third party repair tools.

Jun 17, 2018 3:47 AM in response to léonie

Thanks for your quick answer. I already tried the library repair tool several times, but the thumbnails of most of the affected photos were not rebuild.

Yesterday I also tried your rotating procedure, which worked perfect on 2/3 of the photos. Strangely the rest of the photos did not rotate, they are "unrotatetable". Do you know the reason for this behavior ?

Once more - all images are accessible and are displayed correctly in Photos on Mac without any problems. You can do anything with them, everything works fine. Only the thumbnails are missing !

What to do ?

Jun 17, 2018 4:55 AM in response to léonie

Since iCloud syncing of the photos lib does not work properly, I disabled iCloud syncing. So the complete photos library is only on my iMac ! 165 GB size

As you mentioned, I tried to export 20 of the problematic photos as unmodified originals without any errors, so the originals can be exported and are not missing.

Jun 17, 2018 11:53 AM in response to léonie

I don't exactly know until when the library was working correctly (which backup ?). There are several metadata (special GPS data) combined with the problematic photos. Therefore I prefer the manual method, which will be a lot of work. Perhaps Keyboard Maestro will help me.

One last question about the "unrotatable" photos :

Is there any further method to "touch" or "repair" the "unrotatable" photos, so that the thumbnails will be rebuild.

Do you know if Photos exports the metadata, so I can reimport the problematic photos.

Is there any third-party application available, which handles the metadata.

Maybe the library will be repaired, when I delete the problematic photos.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to rebuild Photos Thumbnails (Previews)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.