2

I want a HTML/JS image gallery generator that "scans" images in a directory and creates a HTML file with a "viewer" for the pictures.

Use case

Before:

DSC02241.JPG  DSC02293.JPG  DSC02348.JPG  
DSC02242.JPG  DSC02296.JPG  DSC02349.JPG  
DSC02243.JPG  DSC02297.JPG  DSC02350.JPG

create_gallery *.JPG > gallery.html

After:

gallery.html
DSC02241.JPG  DSC02293.JPG  DSC02348.JPG  
DSC02242.JPG  DSC02296.JPG  DSC02349.JPG  
DSC02243.JPG  DSC02297.JPG  DSC02350.JPG

Actually the images may be not JPGs, but some unknown format.

Crude prototype

echo '<html><body>' > gallery.html
for i in *.JPG; do echo "<img src=\"$i\"/>" >> gallery.html
echo '</body></html>' >> gallery.html

Requirements

  1. Not linking into Internet for dependencies;
  2. Minimum number of required files and minimum overall size;
  3. Not loading all gigabytes of images into memory at once;
  4. Basic prev/next/fullscreen/slideshow buttons, thumbnails with pages, etc.;
  5. No pre-processing of images. Images (including thumbnails) should be just used in appropriate <img> inside the viewer. It should not stop on unknown file type (I want to use BPG with the appropriate JS decoder).
  • 1
    Found sigal, but it requires config file and it messes with images and maybe even JPG-specific (and I want to integrate the gallery with PBG JS decoder) – Vi. Jan 3 '15 at 2:55
  • 1
    Looked at igal2 - Thumbnails seem to be implemented using separate files and it tries to interpret input images (hence Can't find any image files in directory .) instead of just indexing them. – Vi. Jan 3 '15 at 3:14
  • All those galleries seem to love JPG... – Vi. Jan 3 '15 at 3:16
  • PhotoFloat looks promising... But by default it still generates JPG thumbnails I want to avoid. – Vi. Jan 3 '15 at 3:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.