Where iPhoto Keeps Your Files

Having entrusted your vast collection of digital photos to iPhoto, you may find yourself wondering, “Where’s iPhoto putting all those files, anyway?”

Most people slog through life, eyes to the road, without ever knowing the answer. After all, you can preview, open, edit, rotate, copy, export, and print all your photos right in iPhoto, without actually opening a folder or double-clicking a single JPEG file.

Even so, it’s worthwhile to know where iPhoto keeps your pictures on the hard drive. Armed with this information, you can keep those valuable files backed up and avoid the chance of accidentally throwing them away six months from now when you’re cleaning up your hard drive.

A Trip to the Library

Whenever you import pictures into iPhoto, the program makes copies of your photos, always leaving your original files untouched.

  • When you import from a camera, iPhoto leaves the photos right where they are on its memory card (unless you use the “Erase” option).

  • When you import from the hard drive, iPhoto leaves the originals in whichever folders they’re in. As a result, transferring photos from your hard drive into iPhoto more than doubles the amount of disk space they take up. In other words, importing 1 GB of photos requires an additional 1 GB of disk space, because you’ll end up with two copies of each file: the original, and iPhoto’s copy of the photo. In addition, iPhoto creates a separate thumbnail version of each picture, consuming about another 10 K to 20 K per photo.

iPhoto stores its copies of your pictures in a special folder called iPhoto Library, which you can find in your Home → Pictures folder. (To find your Home folder, begin in the Finder and choose Go → Home.) If the short name you use to log into Mac OS X is mozart, the full path to your iPhoto Library folder from the main hard drive window would be Macintosh HD → Users → mozart → Pictures → iPhoto Library.

Tip

You should back up this iPhoto Library folder regularly—using the Burn command to save it onto a CD or DVD, for example. After all, it contains all the photos you import into iPhoto, which, essentially, is your entire photography collection. Chapter 14 offers much more on this file management topic.

What all those numbers mean

Within the iPhoto Library folder, you’ll find a set of mysteriously numbered files and folders. At first glance, this setup may look bizarre, but there’s a method to iPhoto’s madness. It turns out that iPhoto meticulously arranges your photos within these numbered folders according to the creation dates of the originals, as explained in Figure 4-10.

Behold the mysteries of the iPhoto Library. Once you know the secret, this seemingly cryptic folder structure actually makes sense, with all the photos in the library organized by their creation dates.

Figure 4-10. Behold the mysteries of the iPhoto Library. Once you know the secret, this seemingly cryptic folder structure actually makes sense, with all the photos in the library organized by their creation dates.

Other folders in the iPhoto Library

In addition to the numbered folders, you’ll find several other items nested in the iPhoto Library folder, most of which you can ignore:

  • AlbumData.xml. Here’s where iPhoto stores access permissions for the various photo albums you’ve created within iPhoto. (Albums, which are like folders for organizing photos, are described in Chapter 5.) For example, it’s where iPhoto keeps information on which albums are available for sharing across the network (or among accounts on a single machine). Details on sharing are in Chapter 14.

  • Albums folder. Inside the Albums folder you’ll find a set of folders and preference files corresponding to the albums you’ve made.

    You won’t find any actual photo files inside these album folders—only aliases that point back to the photos stored elsewhere in the iPhoto Library folder.

  • Dir.data, iPhoto.db, Library.data. These are iPhoto’s for-internal-use-only documents. They store information about your Photo Library, such as which keywords you’ve used, along with the image dimensions, file size, rating, and modification date for each photo.

    Note

    You might notice that the two Data files (38 and 38.attr, for example) don’t correspond to the names of the JPEG photo files themselves (IMG_0023, for example). This is because the photo bears its original file name, but the Data files are given a numeric sequence—234, 235, and so on—based on the order in which they were imported. This file-naming convention is strictly for iPhoto’s internal use; you never see these numeric file names within iPhoto.

  • iDVD. iPhoto uses this folder for temporary storage of the files it creates while turning your pictures into a slideshow on DVD, as described in Chapter 12.

  • iPod Photo Cache. As certain lucky-duck customers already know, it’s possible to take your entire photo collection in your pocket—and then display it on the screen of the iPod Photo (the first color iPod). You can scroll through hundreds of photos in seconds, thanks to this folder. Simply put, it’s a collection of scaled-down versions of your photos, just big enough to fit the two-inch screen of the iPod Photo.

  • Library.cache. This file helps iPhoto memorize the condition of your current iPhoto library, which greatly accelerates opening iPhoto and scrolling through the photos.

Folders inside the year/month/date folders

A few mysterious icons appear inside each year/month/date photo folder, too, right alongside your JPEG photo files. They include:

  • Thumbs folder. Here, iPhoto stores the small thumbnail versions of the pictures in your Photo Library—the “slides” that actually appear in the iPhoto window.

    These images are numbered in the order in which they were imported.

  • Originals folder. Some photo folders may contain an Originals folder. It doesn’t appear until you use one of iPhoto’s editing tools (Chapter 6) to touch up a photo. The Originals folder is the key to one of iPhoto’s most remarkable features: the Revert to Original command.

    Before it applies any potentially destructive operations to your photos—like cropping, red-eye removal, brightening, black-and-white conversion—iPhoto duplicates the files and stuffs pristine, unedited copies of them in the Originals folder. If you later decide to scrap your changes to a photo using the Revert to Original command—even months or years later—iPhoto moves the unedited file back into its original location, returning your photo to its originally imported state.

Note

Don’t confuse the files in the Originals folders with your true originals: the files on your hard drive, camera, or memory card that you first imported into iPhoto. As mentioned earlier, iPhoto never touches those originals; they stay exactly where they were when you imported them.

Look, don’t touch

While it’s enlightening to wander through the iPhoto Library folder to see how iPhoto keeps itself organized, don’t rename or move any of the folders or files in it. Making such changes will confuse iPhoto to the point where it will either be unable to display some of your photos or it’ll just crash.

Get iPhoto 5: The Missing Manual, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.