Tip: How to find master/original photos in the Photos Library

I recently came across an issue where Photos would not upload one of my original images to iCloud. No other information is provided... Is the image corrupt? Are my permissions wrong? Nothing. It just failed on this one image. Navigating to the Unable to Upload album I could see the image, but I could not export it, either as it appeared in the library or in its original form. I wanted to find the file for this image so I could examine the TIFF image and perhaps determine what was wrong. Unfortunately, Photos no longer had the ability to show original (formerly "master") files in the Finder.


However, I did find a way to do it!


Open a Terminal window

Drag the photo from Photos to the open terminal window


Terminal will display the path to the derivative version of image in the Photos Library. This will likely look something like this (showing only a portion of the path):


.../Photos.photoslibrary/originals/2/2FCA1678-17CB-4161-B716-437716E4428F.tiff


And there you go!


You can now show the package contents of the Photos Library, follow the path, and navigate directly to the photo you're looking for.


Ah! However, this doesn't entirely work for a photo that Photos is unable to upload. Instead of the path you see above, terminal will show this (again, partial path):


.../Photos.photoslibrary/resources/derivatives/2/2FCA1678-17CB-4161-B716-437716E4428F_1_105_c.jpeg


The derivatives folder is where Photos keeps smaller versions of your images so that navigating through the Photos UI will be faster without having to load in photos at their full resolution. Note that file name is the same as that stored in the originals folder, with "_1_105_c" appended to the end, and this photo being a jpeg instead of a tiff.


In my case, dragging the photo from the Unable To Upload album resulted in the smaller jpeg file, and a quick check of the originals folder showed that the full size image was missing. This made it a really easy job to locate a backup of file in Time Machine using the Finder, delete the damage file from Photos, and reimport the original photo from my backup.


Perhaps one of those "don't try this at home and always operate on a backup" things, but at least I now know how to do it.

iMac 27″, macOS 10.14

Posted on Mar 13, 2021 3:32 PM

Reply
Question marked as Top-ranking reply

Posted on Mar 14, 2021 9:48 AM

John Purlia wrote:

I suspect this had to do with syncing a 500GB library across three iMacs simultaneously, perhaps?

John, do you have different system versions installed on the three Macs? I had a few problems with image files, that the Mojave Macs could still handle, but the Big Sur Macs not. The Big Sur Mac has shown the files in "Unable to upload". I exported the files on Mojave in a different image format, deleted them from all Macs and iCloud, and then reimported them. The files had the jpeg extension, but they may have used an older colour sync profile, that is not preinstalled on Big Sur.



Similar questions

9 replies
Question marked as Top-ranking reply

Mar 14, 2021 9:48 AM in response to John Purlia

John Purlia wrote:

I suspect this had to do with syncing a 500GB library across three iMacs simultaneously, perhaps?

John, do you have different system versions installed on the three Macs? I had a few problems with image files, that the Mojave Macs could still handle, but the Big Sur Macs not. The Big Sur Mac has shown the files in "Unable to upload". I exported the files on Mojave in a different image format, deleted them from all Macs and iCloud, and then reimported them. The files had the jpeg extension, but they may have used an older colour sync profile, that is not preinstalled on Big Sur.



Mar 14, 2021 4:40 AM in response to Matti Haveri

Matti, there are many possible reasons for missing originals, who knows, what happened in this case?

  • A damaged photos library: Originals may not be found, if the library is in a synced folder, has permission issues, a failing drive, inconsistencies after a crash, damages by cleaning software.
  • iCloud: when I restore a library from a backup, there are usually a few images without an original, because iCloud Photos may not have have yet downloaded the original from iCloud, when the backup has been made. Photos does not have any status indicator to show, if all photos have been downloaded. It is showing, when it is downloading, but not, if the download is complete.
  • Referenced files: If the original photo has not been imported to the library on import, it may no longer be accessible, if it has been deleted or moved, or modified.
  • An incompatible filename: Photos may not be able to find files, if the file system format is case sensitive, if the filenames are too long, or contain special characters.
  • Incompatible media formats: After the Big Sur upgrade some of my originals appeared as missing in Photos, because the older format prevented the download from iCloud.

There are probably more possible issues, depending on the system version, the history of the library in question, etc.

The most problem I had with my older Aperture Libraries, from the time before Aperture 3.3 - at that time the iPhoto Libraries have been migrated as referenced libraries to Aperture by default. Aperture referenced the originals in the iPhoto Library to save storage. But it created a mess, because the users have not been advised of this default, when migrating libraries. I am still coming occasionally across broken links from that migration, even after fixing all references at that time, when I noticed, how Aperture migrated the iPhoto libraries.

Mar 13, 2021 3:42 PM in response to John Purlia

Yes, this is a don't try this at home and always operate on a backup thing.


Normally the contents of the library bundle is not intended for user access. If you change anything in the bundle, you are likely to damage your library, and in the worst case stop it from opening at all possibly losing access to your photos.


Obviously this is a bad thing.


In your case, you only looked, but didn't touch, and used the photos app to do the deletion of the image with missing master. For the benefit of anyone else reading, this is all that you should efver do if you view the contents of the library in finder. Never try to edit/delete/move anything in there using finder if you value your photos at all.

👍

Mar 14, 2021 3:47 AM in response to John Purlia

A great idea to use the Terminal to reveal the unique internal, new names, that Photos created from the original file names. It will help us to find the originals, if we need to recover them from a backup.

Just a suggestion: It might be safer first to type

ls 

into the Terminal to start with the listing command "ls " followed by a space and then drag the thumbnail behind the command. If the filename is a command, the Terminal might try to execute it otherwise.


If you have the free trial of PowerPhotos installed, it will also be able to reveal the originals in the Finder, if they still exist. This varies from version to version, because Apple keeps changing the programmatic interface to Photos.

In PowerPhotos I am seeing my Photos Library this way:




Mar 13, 2021 4:03 PM in response to TonyCollinet

Yep. And to further illustrate how there's a lot more going on within a library bundle, Photos deleted the orphaned photo without any complaints. However, upon dragging the recovered original from my desktop into Photos (actually, two steps, first dragging a copy from Backups.backupdb to the desktop, for safety sake, as Time Machine is also a look-but-don-t-touch repository), Photos recognized that the file being imported was a duplicate as far as its internal database was concerned and asked what I wanted to do.

Mar 14, 2021 9:57 AM in response to léonie

In fact, I do! And I'm using one of your past posts to make copies of this library to my siblings (the library contains a complete archive of scanned family photos, slides and negatives belonging to my parents). The library was originally created using Catalina on my 2019 iMac, then upgraded with the move to Big Sur. When it came time to make copies for other family members I discovered they were running Catalina and Mojave — so iCould is syncing the library to a 2012 iMac I booted into Mojave, and a 2007 iMac running Catalina. All my photos and albums seem to have synced correctly (i.e. same number of photos on all three Macs, albums and smart albums synced). The only problem I'm noticing is some odd behavior involving faces and smart albums, so I'm giving the sync more time to sort out that information.

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.

Tip: How to find master/original photos in the Photos Library

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