Take a folder of images and turn them into a simple and static image gallery to host on the web
  • Python 57.3%
  • HTML 31.1%
  • CSS 8.3%
  • Nix 3.3%
Find a file
2026-05-03 02:01:10 +02:00
albums Initial commit 2015-04-08 23:45:17 +02:00
themes/default Nearly a full rewrite :D 2026-05-03 01:50:11 +02:00
.envrc Nearly a full rewrite :D 2026-05-03 01:50:11 +02:00
.gitignore Nearly a full rewrite :D 2026-05-03 01:50:11 +02:00
generate.py Nearly a full rewrite :D 2026-05-03 01:50:11 +02:00
README.md Update readme 2026-05-03 02:01:10 +02:00
shell.nix Nearly a full rewrite :D 2026-05-03 01:50:11 +02:00

Simple static-html gallery generator

Take a folder of images and turn them into a simple and static image gallery to host on the web.

Instruction

The input folder with your images is expected to have the following structure:

inputfolder/
    album_name_1/
        image1.jpg
        image2.jpg
    album_name_2/
        image1.jpg
        image2.jpg

The tool needs the following Pyhton libraries:

  • Matplotlib
  • Pillow
  • Jinja2

The ./generate.py command accepts a few arguments:

--source Default: ./albums The path to your original images. This path will not get modified and is only used as a source.

--destination Default: ./www The output pfad. This path will be generated if it not exists, and it will be deleted if it exists!

--theme Default: default The theme folder that is selected from the themes/ directory.

--thumbnails Default: true If you want to generate thumbnails.

Themes

If you want to create a new theme, you need to create a new folder in the themes/ directory, with the name of your theme. The folder is required to have a index.html and gallery.html which both get rendered as Jinja2 templates. The optional assets/ folder in your theme directory will be extracted to the toplevel of the output folder.