Symlinks inside the iPhoto library

When viewed in the Finder, your iPhoto Library appears as a special package. But in reality it's just a plain folder, with files, folders and symlinks inside it, as shown by the Terminal:

This listing is from my iPhoto '11 library, upgraded from the previous iPhoto '09. Note the use of symlinks to map the old folders Originals and Modified to their new names: Masters and Previews.

The library folder structure is complex and change between versions (learn more), but in this article my only focus will be the symlinks.

List of symlinks

iPhoto '09 — New library
Data Data.noindex
iPhoto '11 — New library
Database/BigBlobs.apdb Database/apdb/BigBlobs.apdb
Database/Faces.db Database/apdb/Faces.db
Database/History.apdb Database/apdb/History.apdb
Database/ImageProxies.apdb Database/apdb/ImageProxies.apdb
Database/Library.apdb Database/apdb/Library.apdb
Database/Properties.apdb Database/apdb/Properties.apdb
iPhoto '11 — Library upgraded from iPhoto '09
Data Data.noindex
Data.noindex Thumbnails
Database/BigBlobs.apdb Database/apdb/BigBlobs.apdb
Database/Faces.db Database/apdb/Faces.db
Database/History.apdb Database/apdb/History.apdb
Database/ImageProxies.apdb Database/apdb/ImageProxies.apdb
Database/Library.apdb Database/apdb/Library.apdb
Database/Properties.apdb Database/apdb/Properties.apdb
Modified Previews
Originals Masters
Note: I don't have access to previous versions of iPhoto. I you do, please help me to complete this table.

New or upgraded library?

The use of symlinks in the library depends on the iPhoto version, and if your library is new or upgraded from a previous version.

For brand new libraries the structure is cleaner and just a few symlinks are created. As you can see in the previous table:

Aditional symlinks are created when you upgrade your library from a previous iPhoto version. The symlinks are used to map the old files and folders to their new locations, avoiding the compatibility break with other softwares or services.

For example, iPhoto '11 renamed important folders used in previous versions such as Originals, Modified and Data. If you create a new library, only the new folder names will be used. But if you're upgrading from iPhoto '09 the old folder names will be symlinks that point to the new names.

Do not remove the symlinks

If the symlinks were not necessary, they would not be created by iPhoto in the first place. Do not mess up your library by removing them. In fact, you shouldn't do anything manually inside the library folder, to avoid data corruption.

For iPhoto '11, there are reports that new folders will be created if you remove the legacy symlinks:

Removing the symlinks does not work. You can open your iPhoto library, but work with it for a while and you'll find new directories (yes, directories, not symlink) replacing the old symlinks. This, of course, leads to problems as you can imagine… — Thomas A.

A simple solution to get rid of the legacy symlinks in iPhoto '11 is to create a new library and reimport all your pictures. But all your metadata will be lost: albums, keywords, ratings, descriptions… Not a good deal in most cases.

Symlinks + Dropbox = Problems

Symlinks are a basic Unix feature, but they were not supported in Windows before Vista. So be careful if you're backing up your iPhoto library to a Windows machine or a multi platform service such as Dropbox.

Dropbox does not preserve symlinks, since it needs to support older Windows versions. When a symlink to a folder is found, Dropbox treats it as if it was a plain folder, and uploads all its contents to the server, resulting in duplicated contents.

This is specially problematic with upgraded libraries in iPhoto '11. The Originals symlink will turn into a plain folder in your Dropbox account, and all your photos and videos (currently in the Masters folder), will be duplicated. Say goodbye to your quota :(

Learn how to fix this problem: Fix: iPhoto '11 library doubled size in Dropbox.

— EOF —
GitHub