Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

88 lines (63 sloc) 3.01 KB

yadfig, a damn fine image gallery generator

Once was…

Yes, it worked quite nicely, but it was kind of ugly and sucked (according to its creator). At the price of a few dependencies (pyexiv2 and PIL, since I don't consider python to be a real dependency on a machine that will host pictures), you can have something much nicer (in my point of view).

As, is produces a single HTML file, which should work in any reasonably recent web browser (since it uses HTML5 & co. delicacies), and is very easy to host on any web server, without having to use any server side programming, hopefully increasing speed and security.

I could write for hours, but nothing would bet a working demo, so here it is :

Ok, I'm convinced, what next ?

I just want to use it, you know…

Then grab yadfig in the download section, make sure to have pyexiv2 & PIL installed (as well as Python, of course), and you're good to go.

I want to build it myself from source…

You need to install the dependencies : jsmin and a couple Python libraries. On a Debian-like system, this line should do the job:

sudo aptitude install python-pyexiv2 python-imaging

The build script uses sed (any flavor) and tr, but everybody should have those. Also, put a copy of jsmin (compiled from this file), and put it somewhere in the $PATH. pyexiv2 should be in version 0.3, there is an API compatibility break somewhere in the previous versions.

Speaking of build script, here are the steps to install it when dependencies are satisfied :

git clone
cd yadfig
chmod +x yadfig
mv yadfig ~/bin # or other directory in $PATH


To enjoy yadfig, go to a directory which happen to contain pictures (it supports all formats that PIL support, and there's formats you probably never heard about), and invoke :


An index.html file should appear, as well as a .c directory containing thumbnails. If you want to, you can invoke it that way :

yadfig -p "The location where the photo were taken" -t "A title"

It produces a somwhat nicer output.

Yeah, but it doesn't do that !

Patches are welcome, but the whole thing is aimed at simplicity.

It's broken, I use IE or Opera !

I haven't tested IE, and Opera for 30 seconds, and it silently failed. There are great free and open-source browser you can try instead that happen to work.

You code is crappy !

I know, I just started with js and web stuff. The codebase quality will eventually get better with time. If you see something really nasty, drop me a line at @padenot or somewhere else.

Why hot pink when the text is highlighted ?

This guy knows why, and I aggree :


New BSD License :


js, html5 & css3, python, PIL, pyexiv2, sh, vim, html5boilerplate, obviously Firefox and Chromium, love.

Jump to Line
Something went wrong with that request. Please try again.