I had been looking for a way to host/serve my photos since I switched over to Hugo to generate this static website. Actually, I had been looking for a way to share my photos for a while now – ever since I deleted my Flickr account when they were acquired and were going to delete all but 1,000 of my photos (plus, the previous string of Yahoo! security breaches didn’t help).
The one thing that I learned from my Flickr experience was that it’s great to have my photos hosted and served somewhere, until it isn’t. I was able to get my photos back using a Flickr downloader, but all that history and curating work that I did was gone. I wanted to have something that I could host myself and have it be portable to move around.
I did not want to run a server just to be a photo gallery server – though had I gone down that route, Piwigo looked pretty interesting. So, while I am on vacation this week, I was keeping busy and looking for solutions. The one I finally found, tested and settled on was Sigal.
Sigal is a “simple static gallery generator”. It’s written in Python and is easily installable using pip. I still have some tweaking to do, but I spent the afternoon getting everything setup, both with Sigal and Hugo. For Sigal, the install was easy. The docs were informative and I was able to get a gallery generated with photos I already had in my old photos section in no time at all. I like how it takes care of everything for me (resizing/compressing photos and generating a static site based on directory structure, photo files and Markdown files).
On the Hugo side, I moved over some photo posts over to the posts area, these were mainly entries that had multiple photos or where I had written about the photos. I then cleaned up the “photos-assets” area which was where I had kept all the photos for the old photos section. I had been referencing photos in that section in my posts section also, so I used my sed-fu to get URLs rewritten in posts.
Sigal is setup to generate the photo gallery into the static directory in my Hugo site directory. Hugo moves everything into place when generating the main site and rclone is used to get everything to Microsoft Azure Blob Storage where ultramookie.com is served from. I debated having the photo gallery on its own subdomain, but I decided not to so that I could keep the whole site together as one.
The photos link in the navigation bar will now that you to the new photo gallery.
That was a fun project for a day off from work.
Continue the conversation on LinkedIn, Twitter or Mastodon.