Nefaria.com

Bash Thumbnail Gallery

This is a very simple, highly customizable bash script that is meant to be called from a browser (i.e. it’s a CGI). Just drop it in a directory that contains a bunch of JPGs, PNGs and/or GIFs, make sure it has executable permission, call it from a browser, and it will create a “gallery”. It depends on ImageMagick (“convert” to be precise) so be sure you have that installed that before using it.

By default, it will create a no-frills page with three images per row (and as many rows as it takes to list all the pictures in the directory)—hey, I said it was simple. The Images will be links to the originals. You can change the default behavior by editing the “ITEMS_PER_ROW” setting at the top of the file; you can also change the image quality and image size the same way.

Thumbnail Gallery Screenshot

Thumbnail Gallery Screenshot

I originally wrote this script for educational purposes but it works well for the task it’s intended to accomplish. Go ahead, customize the hell out of it… or not. You can download it here. If for some reason this script absolutely rocks your world, feel free to make a donation via paypal :-)

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...