Introducing DD Photos - open-source static site generator for photo albums

I’ve been using iCloud shared albums to share travel photos for a while, but was increasingly dissatisfied with the performance of the albums (they can take 25+ seconds to load).

I’m a software engineer, and decided there must be a better way, so I built my own, and I think it turned out pretty well. It’s a static site, and can be hosted in multiple ways (I happen to use S3):

If it worked for me, I figure it might work for someone else, so I decided to open-sourced it.

There is a Go program which resizes the images and a SvelteKit-based frontend for viewing the albums. See the GitHub site above for all the technical details.

Here’s some screenshots from the sample site:

19 Likes

Awesome, thanks for sharing and welcome to the community!

1 Like

Since I posted this, I’ve been making continuous improvements. I actually migrated my personal site to AWS S3 from AWS EC2/Apache to save myself some money.

The release history summarizes the improvements:

Cheers

Doug

3 Likes

I’ve just released new Docker based tooling that vastly simplifies using DD Photos. All you need is Docker and then you can do this:

mkdir ~/my-ddphotos
docker run --rm -v ~/my-ddphotos:/ddphotos dougdonohoe/ddphotos init
cd ~/my-ddphotos
./ddphotos photogen   # resize images and create index files
./ddphotos run        # run dev server at http://localhost:5173
./ddphotos build      # build static site
./ddphotos serve      # serve static site via Apache at http://localhost:8000

Adding your own albums is as easy as editing the config/albums.yaml. The DOCKER.md page has full details.

1 Like

One more note - I discovered the existence of surge.sh a place to host static sites for free (no kidding). The latest version of DD Photos supports deploying to Surge.

Example:

mkdir ~/my-ddphotos
docker run --rm -v ~/my-ddphotos:/ddphotos dougdonohoe/ddphotos init
cd ~/my-ddphotos
./ddphotos photogen       # resize images and create index files
./ddphotos build          # build static site
./ddphotos serve          # serve static site via Apache at http://localhost:8000
./ddphotos export --copy  # Export for surge to copy
surge --domain my-unique-site.surge.sh export/my-photos

The DD Photos site on surge: https://ddphotos-test-sample.surge.sh/

1 Like

We now support Cloudflare, which has, as I understand it, unlimited bandwidth for personal sites:

./ddphotos export --cloudflare
wrangler pages deploy --project-name my-unique-site export/my-photos

DD Photos site at Cloudflare: https://ddphotos-sample.pages.dev/

2 Likes