Background/context (skip if you’re in a hurry)
My family have a fairly big photo collection of more than 800 GB and 500k photos and covering the last 20 years. The collection is hosted on a Linux server.
The photos are currently viewable from Digikam on laptop/desktop computers. However, I want to make the photos available from mobile devices as well. I figure the easiest way should be by creating a simple web gallery. I have tried various free web galleries but have not been able to find anything that both works well on mobile and is customizable to my needs. The closest I came was Sigal (Sigal - Simple Static Gallery Generator — Sigal 0.1.dev1+g8481f20 documentation). However, pages created by desired Sigal themes seems to crash iOS devices with albums of just a few hundred photos…
I do not run the gallery software directly on the photo collection. Instead, I run it on a folder containing a downscaled copy of the collection. That is: all raw files are converted to jpeg; all jpegs are downscaled to a reasonable resolution and quality of like 85 instead of 100.
I have a shell script that runs via cron to update this downsized copy of the collection…
It is also vital that the gallery can be generated incrementally via cron.
Jekyll specific part
I figured I might just try to create my own gallery using Jekyll. I thought: how hard can it be? It is mostly just resizing some images and generating some static HTML/CSS/JS for each image.
This is basically how I imagine it to work:
For each $folder in say, _photos, do: for each $image_file (*.jpg, *.heic, *.webp, *.png files) in $folder, do: produce resized thumbnails of $image_file into _thumbnails/$folder/$image_file add $image_file to the list $album_images generate $image_file_view.html containing HTML to view the image for each $subfolder in $folder, do: add $subfolder to the list $subalbums generate an index.html containing: links to each $image_file_view.html using the _thumbnails/$folder/$image_file in an <img> tag links to each subalbum recurse throughout any subfolders inside _photos
Is something like this easy to make with Jekyll?
What I seem to be missing is how to generate html files based on image files or folders…
I also tried searching for existing image gallery plugins for Jekyll and found this:
However, this seems to be for very simple galleries (seemingly no sub-albums) and also uses some third party web service to resize images…
I would really love to have some input into this. Am I approaching this the wrong way? Am I missing some jekyll plugin that is suitable for this? Or maybe just some other open source project that has just solved this?