Photon is a static HTML gallery generator.


  • static HTML pages (you can put all pages and images on a CD-ROM)
  • slideshow (use javascript optional)
  • can use gimp to resize picture for greater quality
  • navigation between the image can use the keyboard (use javascript optional)
  • work on any browser (Mozilla, Netscape Navigator 4.x, Konqueror, Opera)
  • Each image can have a comment (with HTML tags)
  • Information about the image (if taken from a digital picture) can be draw
  • thumbnail image size can be choosed by the user
  • output images can be scalled down
  • control the number of thumbnail in a page
  • movie support (new in 0.4.0)
  • w3c compliant



  • Python >= 2.1
  • Python Imaging Library It’s the library use to load image, resize (optional if you have gimp)
  • EXIF library (included in this package but optional)
  • Gimp for better quality (optional)
  • dcraw to decode RAW files (optional)
  • Some photos and free space disk
  • a web browser
  • a web browser with javascript enabled (optional)


Photon is released under the GNU General Public License and can be used free of charge.


Mercurial repository::

 hg clone static-

Last release: 0.4.6


How to build a gallery:

 The quick start:
   # photon -o myoutputdir /photos

Use the gimp plugin # photon –resize-plugin=gimp -v -o myoutputdir /photos

Change the size for all images and the thumbnail keeping the original photo (0) # photon –sizelist=0,1600x1200,800x600 –thumbsize=320x240 -o myoutputdir /photos

My current command line: # photon -a -m -z -s 640x480,800x600,1280x1024,1600x1200 -o /tmp/torcy /torcy

See photon –help for a list of switch

All options of the programs:

Photon 0.4.0

Usage: photon [OPTION]… [PATH]…

Options: -a –awstats Insert Javascript for Awstats –awstats-url Change default value for Awstats script url -c NAME –comment Name of the comment file (default .comments) -d NUM –display-columns=NUM Number of columns in index (default 3) -E –no-exif Don’t include EXIF information in HTML file -f –force Overwrite non-image generated files (html, javascript, etc) (default no) -ff –force –force Overwrite image files (default no) -h –help Print this help -I –no-index Do not generate the high level index.html -J –no-javascript Do not use javascript (no shortcuts, … ) -l NUM –display-lines=NUM Number of lines in index (default 5) -o NAME –output-directory=NAME Name of the output directory -m –movie Movie mode, include link to movie (*.mov) -s LIST –sizelist=LIST Image sizes (default 0,1024x768,800x600,640x480) 0 is special case to specified the original resolution wxh specify the width and the height in pixel of the image -t SIZE –thumbsize=SIZE Size of thumbnails (default 160x120) -V –version Print Photon version -v –verbose Be verbose -z –compress Compress the original image if selected (default copy the image) –exif-bordercolor=COLOR Exif window border color (default #008000) –exif-bgcolor=COLOR Exif window background color (default #f0fff0) –exif-fgcolor=COLOR Exif window text color (default ‘black’) –body-bgcolor=COLOR Body background color (default #ccccff) –img-bgcolor=COLOR Image background color (default ‘white’) –exclude=PATTERN Exclude files matching PATTERN –resize-plugin=PLUG Program use to create thumbnails internal: fastest method (default) gimp: use Gimp>1.x (better quality) magick: use ImageMagick (not implemented) –resize-quality-low=Q quality for small image. 0 (bad) and 100 (good) –resize-quality-high=Q quality for big image 0 (bad) and 100 (good) –gimp-program=PROG use PROG for gimp

Shortcuts while viewing an image: n/SPACE Go to the next image (with the same resolution) p/BACKSPACE Go to the previous image (with the same resolution) s Start/Stop the slideshow +/- Increase/Decrease by one second the slideshow’s period h Show shortcut and help i Show Exif information z Change to the higher resolution [NOT YET IMPLEMENTED]


  • Rewrite the code to use a template engine (long and hard)
  • Better support for video (mpeg and avi)
  • Use XHTML and CSS (see the template engine)
  • Graphical tool to edit comments
  • Put an optional Creative Common Licence