KhatGallery (khatgallery) is (yet another) HTML photo album generator. It takes a directory of images, and generates the HTML pages and thumbnails needed.

This includes the khatgallery script (to generate the gallery) and the kg_image_info script (to get information about an image).

I decided to write this because, while there are gazillion gallery scripts out there, none of them do quite what I want, and I wanted to take nice features from different scripts and bring them together.

  • Pre-generated (baked, not fried)
  • Can recurse down into sub-directories of the top gallery directory.
  • Generates only new files by default.
  • Can clean out unused files.
  • Can force regeneration of HTML or thumbnails.
  • Does not require Javascript.
  • Ability to add plugins.
  • Meta-data from more than just jpeg files.
  • Multi-page albums. That is, directories with lots of images can show only so many images per index page, instead of having to load every single thumbnail.
  • Very simple page template, not complicated themes. (Yes, I consider this to be a feature, not a bug)
  • Pixel-area thumbnails (rather than conforming to particular width or height, you get higher-quality thumbnails by making them have a given area).
  • XHTML compliant.
  • Dynamic columns with CSS and HTML, rather than fixed tables.

An example of this in action is the Gallery pages on this site.

The name KhatGallery comes from a slight mangling of "Kat's HTML Gallery"; it's so hard to come up with names that haven't already been used.

This module is released under the same conditions as Perl, that is, under Artistic Licence and the GNU General Public Licence.

This bundle is available on CPAN. Just go to my page on CPAN.