Automatic thumbnail generation and integrated lightbox: give users a high-level glance of your work with low-bandwidth images, with high-res versions are a single click away.
Robust tagging and filtering system: user-definable and hierarchical tags make it easy for users to find the works they want to see or for you to link users to a specific subset of your works.
All gallery information stored in a single file, which can be updated through a bundled python script: no pesky copy and pasting of image locations and descriptions!
Direct link to individual images in gallery view: avoid hotlinking raw images and preserve the bundled description for a given piece.
Making this was both a stretch of my web dev skills and a way to reach into Jekyll and learn more about what it can do. While I have a much better grasp of how to work with liquid and ruby now, some of the internal workings of this are a bit.. hack-y.
I designed this gallery to be modular and easy to update, but I didn’t exactly prioritize portability or ease of installation– even if it takes some effort to get running, hopefully this project can still be of use.
Aside on background knowledge: I wrote this guide assuming that the user has a baseline familiarity with navigating a command line interface, but I recognize that many readers of my blog may not have this.
I have a brief cliffnotes guide on this very topic here; the two things that you need to know for this are that cd can be used to change directories– when I say “inside x directory”, I mean that you need to cd to be inside it– and that control + c can end a currently running command
Note for Windows users: While it is possible to install all of these tools under windows, I highly recommend installing WSL and running JIG there instead.
Step 1: Get the demo online
Bundled with the gallery is a demo that you can use to make sure that Jekyll is set up properly. You can see an example of what the demo should look like here.
Download the latest version of JIG from the releases page.
Create a new Jekyll site with
jekyll new mysitename
Extract the contents of the JIGv*.zip into the mysitename directory.
If there are any warnings about files with the same name, overwrite the ones in the Jekyll directory with the ones from the JIG folder.
From inside the mysitename directory, run the following command to build and serve the webpage locally.
bundle exec jekyll serve
This may take a few minutes the first time you run it because thumbnail generation is happening in the background. As long as there are no error messages, this is fine.
Voila! The demo should be running on your local machine.
Step 2: Populate the gallery with your own images
The gallery expects all images to be stored in /imgs/gallery/ and stores a file with information about all of these at _data/gallery.yml. The script generateGallery.py can automatically update the yml file based on the contents of the image directory.
Delete all image files currently inside of /imgs/gallery/.
Copy your image files into /imgs/gallery/.
JIG will try to sort images based on image names. The heading that each image is placed under is decided by the filename up to the first underscore (_). All image filenames must have an underscore for the script to work.
Edit _data/gallery.yml and remove everything under the images heading.
Remove the contents of the tags section and add your own tag structure.
You can have as many tag groups as you like, but remember that every gallery item will need to be tagged with at least one item from each root group.
Gallery items may be tagged with multiple tags from any group.
Hierarchical tags can only go 3 layers deep.
Inside the directory for your project, run python generateGallery.py -i and follow the prompts to describe and tag your images.
Run bundle exec jekyll serve and check your local browser to make sure that the gallery appears as expected.
To export the gallery to your website, run bundle exec jekyll build and copy the contents of the _site folder to your web host.
Step 2.5: Update the gallery with more images
This project was designed to make this step as simple as possible after the initial setup.
Copy all new image files to /imgs/gallery/.
From the project directory, run python generateGallery.py -i and follow the prompts.
Run bundle exec jekyll build and copy the new contents of the _site folder to your web host.
Step 3 (optional): Integrate the gallery with the rest of your Jekyll site
This step is a little involved because JIG leverages many features of Jekyll, all of which need to be integrated for the gallery to work.
Copy the following paths from JIG into your project directory:
add a ? to the end of the URL and list each tag group after that, separated by a &
both tags and groups are lowercase and “slugified”, ie all spaces are replaced with - and all punctuation is removed
when specifying multiple tags in the same group, separate them with a comma
when specifying a nested tag, all tags that are above it in the hierarchy must be defined as well
Default view
In _data/gallery.yml, the default groups on page load can be specified by adding a default group with tag groups inside it, formatted the same way that they are in the tags section. Items that do not have these tags will be hidden by default.
For example, the following will hide all items tagged with “arachnophobia” from the demo gallery:
default:
Warnings:
- No warning needed
Thumbnail size and quality
Some settings for how ImageMagick creates thumbnails can be defined in your _config.yml file. The default settings are as follows:
responsive:
pixels: 22500 # approximate number of pixels in each thumbnail
quality: 30 # image compression quality
In Closing
Please let me know if you experience any bugs or errors while using this tool. Some aspects of this are a little rough around the edges, but I believe that under the listed conditions this gallery should work.
I have released JIG under the MIT Licence, so attribution is not required, but I would appreciate a link back if you did use this software on your website.
"If they think you're crude, go technical; if they think you're technical, go crude." Site contents and theme by Hamaonoverdrive. compiled:2025-12-14T00:27:13-08:00
No comments yet!