I get the following error in Photos app on my Mac.

Missing File
Photos with unavailable original files cannot be opened.
The original photo “IMG_3076.JPG” is either offline or cannot be found. Click “Find Original” to reconnect.

I want to follow the instructions from how to avoid getting missing file error in photos, so my question now is,
Is there some way to get all missing files from Photos library? It is going to be impossible to double click every photo to find out if it is missing. I need just the directories, i can place them back one by one and consolidate.

  • I had an idea, but I can't really test it. If you copy all potentially missing photos into one single directory, maybe on an external disk, then attempt to consolidate... I wonder whether it will look in that directory for all, once one has been discovered there manually. iTunes can do a similar thing, afaik. – Tetsujin Nov 1 '16 at 12:52
  • Let me try this, I have copied the Photo Library to the backup drive that has the folder structure in place, I will try to open that and run a consolidate on that copy (the one on the external hard drive). Will that work? – A j Nov 1 '16 at 13:45

Short answer: you can use the script in this GitHub repo.

Long answer: I had the same question, and it turns out that the photo library is backed by a SQLite database under the covers. On your machine, you can find the database file at <photo library root>/database/photos.db. There's a table called RKMaster, with a row for every photo, and a fileIsReference column that tells you whether the photo is "external" or not.

The script I linked to simply dumps the list of all external files, and then iterates through to check that each one exists on disk.

Note that the table also includes an isMissing column, but this is not good enough by itself. It only tells you about the files that Photos "knows" are missing, because you tried to double-click them, or use them in some way. If you simply delete a file from disk, but don't try to access it in Photos, the isMissing column will be false.

|improve this answer|||||
  • I have not yet been able to confirm that the list generated is accurate. But will mark this as answered. – A j Aug 31 '17 at 9:09

I've found that the isMissing flag doesn't mean that the image is gone, just that it's not currently on disk. Using the Python script here, I was trying to copy all of my images out of Photos for backup. I noticed that several images were not being copied, and it turned out it was because they had the isMissing flag on them. But, I was able to take the image name (e.g., IMG_1234.JPG), search for it in Photos, and it found the image. And when I opened the image in Photos for viewing, there was a progress circle shown in the lower right corner (as though it was loading the file from somewhere), and when I checked the folder inside the Photos library on disk, sure enough, the missing file was now there. So now the mystery is, where are these "missing" files stored, and how do I access them (without having to visit each & every one within Photos)? And has anyone reverse engineered & documented the schema of the Photos SQLLite DB, including what the various fields mean, like "isMissing"? I haven't been able to find it myself.

|improve this answer|||||

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .