Static photo gallery with thumbsup

by on
  • docker
  • technical

I’ve been looking for a way to host online photo galleries for a while. Since the rise of social media a lot of “do it yourself” projects have been abandoned. For galleries this means that they’re stuck in the age of HTML tables and ugly designs. The social media generation expects easy to use and well designed user interfaces. I don’t want to give them a chance to say “it would have been better on social media.”

As my own website is statically generated my web server does not provide any scripting capabilities. This makes it secure, low maintenance and fast. In order to be hosted on the same server, the gallery should be generated upfront and require no server-side code. Picture galleries are something I tend to forget, I don’t want to be doing security updates for a grid of images.

After trying a few tools, I ended up using thumbsup. It’s very easy to use and creates great albums mostly with default settings. No configuration files, no special projects: just give it a folder with images and it’ll create something nice.

Gallery created by thumbsup

The command below creates a basic gallery with the great built-in flow theme. Running it in docker makes it even easier as you don’t have to mind the python and image resizing dependencies.

docker run -t \
	-v /path/to/source:/input:ro \
	-v /path/to/gallery:/output \
	-u $(id -u):$(id -g) \
	thumbsupgallery/thumbsup \
	thumbsup \
	--input /input \
	--output /output \
	--title "Gallery title" \
	--cleanup \
	--theme flow

The resulting gallery in the output directory is self-containing: it doesn’t need the source folder to function. Other than that, the website it creates works as you’d expect when opening a folder of images. Subfolders are represented as galleries named after the folder, images in the root folder are shown below the galleries.

More configuration options can be found in the thumbsup documentation.