Larger images with the gThumb web albums feature

Posted on 12/25/2023 in misc

gThumb, an image editor and organizer that ships with most Linux distributions, has been a favorite tool of mine for many years. It has a neat feature that outputs static web albums from within the application. I've used the feature off and on for years.

Example Album

Recently, I decided I would like to standardize on it for sharing photos here. However, it defaults to outputting a 650px wide image in the web album, which is a little small for today's larger monitors. Because it is open source, there is nothing stopping me from fixing the application.

Using Google, a few Reddit posts plus a blog post by somebody that made their own theme, and some help from the Gnome gThumb Discourse, I found the theme files at /user/share/gthumb. I poked around the theme files and found this in the index.ghtml file for the theme. There is also a container for the image in the style.css that you'll want to update to match your new file size.

<% set_var preview_width="750" preview_height="750" if="image_description_enabled || image_attributes_enabled" %>

<% set_var preview_width="650" preview_height="650" unless="image_description_enabled || image_attributes_enabled" %>

The numbers may vary based on the theme, but increasing those numbers is how you get a larger output image. I increased them to 1000, resulting in the album I linked above.

Click to comment, reply, or complain via email

I like hearing from readers, all three of you! Nobody comments on blogs anymore, and I'd rather not use Facebook or Twitter as a comment system so it's back to the email.