Database Schema

While I wasn’t looking (which is often), Apple changed the way photos are stored in It used to be that the original file from your camera was maintained in a folder named ‘Masters’. This is no longer the case. Looking through Photos Library.photoslibrary, you will no longer find anything like ‘IMG_1234.jpg’. Instead, in a folder ironically named ‘Originals’, you will find oodles of files named with a UUID and extended with the original file type (like ‘5A0B2880-8281-4595-95CA-CD62FD80440C.jpeg’).

What I would like to know is how to relate the real original filename to the current pseudo-original filename. Anybody know?

Further digging reveals there is still a masters folder:
Photos\ Library.photoslibrary/resources/derivatives/masters

but the files there are named (kinda) like the pseudo-original filename. This filename is derived from the id property (reference AppleScript’s “” dictionary).

The reason I went down this rabbit hole is that the menu item File->Show Referenced File in Finder always seems to be grayed out. Anybody know why?

AFAIK, there is no way “to relate the real original filename to the current pseudo-original filename”.

When I want to backup just my originals with Arqbackup, I still select the Originals folder. Otherwise, it’s Select All, Export Unmodified Original for . . .

And even with the standard Export Unmodified Original command I still get a lot of originals renamed like ‘5A0B2880-8281-4595-95CA-CD62FD80440C.jpeg’.

Well, there is, if one is willing to resort to AppleScript. Apparently the original filename is retained as metadata. It must be in the SQLite database somewhere but I couldn’t find it.

Let us know if you figure it out. Good luck.