If you export photos from Apple Photos with File > Export, you get a flat pile of files. The albums are gone. This post explains why, where the library actually lives, and how to get a folder per album out of it.
Why File > Export loses albums
Albums in Photos are not folders. They are lists stored in a database that point at photos. Export writes the photos, not the lists. A photo in three albums is one file, and the information about which albums it was in stays in the database.
Where the library lives
By default it is one package in your Pictures folder:
~/Pictures/Photos Library.photoslibrary Right-click it in Finder and choose Show Package Contents. On my Mac the top level has these folders:
database external internal originals private resources scopes The originals are in originals/ (in subfolders named by the first character of the file's ID). The albums, folders and metadata are in database/Photos.sqlite. Do not edit anything in there, and work on a copy. Opening the database while Photos is running can also cause trouble, so quit Photos first.
iCloud and Optimize Mac Storage
If "Optimize Mac Storage" is on in Photos settings, the library may only hold smaller previews of many photos. The originals are in iCloud. Any export from the files on disk then gives you small copies.
Before exporting, switch Photos to "Download Originals to this Mac" and wait until it finishes. You need enough free disk space for the full library.
Free option: osxphotos
The open-source command line tool osxphotos reads the Photos database and can export into a folder structure built from album names. According to its documentation, the directory template takes {folder_album}, so a command like this should write one folder per album:
pip install osxphotos osxphotos export ~/Desktop/photos-export --directory "{folder_album}" I have not run this, so treat the command as untested and check osxphotos help export for the current options. Two things to know from its docs: a photo in several albums can be copied into several folders, and photos in no album need a fallback in the template. Terminal may need Full Disk Access.
Disclosure: I built AlbumRescue
I built AlbumRescue, a Mac app from my small company Kayabyte, for the cases where Photos cannot or should not open the library. From its page, and only that:
- It reads a Photos library on an external drive, from an old Mac, in a damaged copy or in a Time Machine backup, and only reads. Nothing in the library or backup is changed.
- It shows the albums and photos it finds, compares two libraries, and saves folders named after your albums with your original files, XMP sidecars and a CSV report.
- It tells you for each item whether the original is here or only a smaller copy. It cannot get originals that live only in iCloud, and it does not talk to iCloud.
- Edits are not exported in the direct edition, you get the original as imported.
- The scan, the lists, the comparison and 5 saved photos are free. The page says when you may not need it: a healthy library can be opened by Photos with the Option key, and Time Machine restores can bring albums back.
More: AlbumRescue
Not tested for this article: the osxphotos command, and the iCloud download step on a large library. I only listed the library folder names on one Mac.
Written with help from an AI assistant.