Image gallery generator, graphical interface

This online script generates a web page with an image gallery built with all images in a directory.

A command line version exists.

This tool lets you select image files from a list built from the content of your website, to make a gallery, set according to your preferences.

The program works in two stages. A first interface offers options to select the image files, then once the list is displayed, a second interface lets you define how to make the gallery. It is created in an HTML file on the website in the chosen directory.

Note that the appearance of the gallery is defined by yourself in a stylesheet. So the images are inserted with the "thumb" class and the CSS file is referenced as "gallery.css" in the generated page.
You have to build this style sheet and define the "thumb" descriptor.

Interface for selecting files

Source of images

The directory where the images are stored. By default, "/images/".
Always ended with "/".

Recurse

Crawl recursively sub-directories or not. Default not, only the contents of the directory is listed.

Since

Number of previous days. If the images were posted online the same day, type 1 to speed up the research.

Image extensions

List of recognized extensions, separated by a comma (no spaces). You can add or delete extensions here.

Image only

By default only image files, identified by the extensions, are taken into account. If you have your reasons to display other files, uncheck the box.

Get Images

Command to start the building of the list.

Interface Definition Gallery

Title

Provide a title to the page and the H1 tag.

File to create

Name of the HTML file to create for displaying the images. If empty, or if "/", no file is created, the gallery will be displayed immediately, allowing you to see the how it looks.
Note that the file can not overwrite an existing file. If you do so many tests, the hosting will be filled with many files to delete!

Columns

Number of images juxtaposed on the same row.
You have to set the page width based on the total width.

Generate Gallery

Launches the generation. In all cases, the gallery will be displayed, even if a file is created.

Example of stylesheet

A minimal gallery.css file might look like this:

body {
  width: 3000px;
}

.thumb {
  margin:2px;
  border:3px solid #ccc;
} 

The width of the page defined in the body depends on the sum of the width of the images on a same row.

Download from the Bioloide page.