Extract photos from an album in Photos.app and package it up to display on my website
README.md

photo-album-extractor #

This is a tool for extracting photos from Photos.app in a specific album and exporting a bundle for use in a photo gallery on my website.

I want to share my photos with other people, but want to manage that all in the main app I use for my photos.

The tool is intended to be idempotent, and the output should be kept around between runs to avoid unnecessary operations. For best results, run on a cron or with launchd on a regular basis.

Features #

Tagging #

Photos.app has a tagging feature, which we utilize to pull tags for each photo. Tags are stored as a separate table and joined to each photo, which makes it easy to query by tag.

People/pets #

Using metadata Photos.app keeps on detected people/pets, I'm automatically tagging photos of my family.

This is hard-coded because I don't want to define a config file.

Output #

The following is generated when run:

  • Full resolution exports of each image
  • Thumbnails for each image (resized and converted to webp)
  • A SQLite DB with metadata for each image

Future work #

The following are possible, but not implemented yet:

  • Strip location exif data (I'm never using iPhone photos so this isn't an issue for now)
  • Automatic tagging using Photos.app search (could be slow?)