# Thumbnails

A thumbnail is a small image that graphically represents the contents of a directory or image file. ImajSite supports two types of thumbnails: directory thumbnails and slide thumbnails. Directory thumbnails are supplied by the user, and slide thumbnails are created automatically by ImajSite.

### Directory Thumbnails

Each directory may contain a thumbnail image with the name "thumb.gif" or "thumb.jpg". These file names are reserved for thumbnail images, and will not appear as slides in the index. Additional thumbnail file names can be specified in the configuration file.

When an index is created, its automatically generated header will contain the thumbnail image for the directory (if a thumbnail file exists). In addition, each link to a subdirectory which contains a thumbnail will display that directory's thumbnail next to its link.

The recommended size of a thumbnail is 100×66 pixels, but any size that will fit in the index is allowed. If the height of the thumbnail exceeds 150 pixels, it will not be displayed in the automatically generated header.

### Slide Thumbnails

If a subdirectory called "thumbs" exists off the current directory, the thumbnail images in that directory will be used as thumbnails for the individual images in the current directory. The thumbnails must be named "`tn_`filename`_`ext`.gif`" or "`tn_`filename`_`ext`.jpg`", where filename is the base file name of the slide image file (without the extension), and ext is the file name extension. For example, a GIF thumbnail for "`myslide.jpg`" would be "`thumbs\tn_myslide_jpg.gif`".

ImajSite will automatically create thumbnails for all JPEG images in the current directory if a "thumbs" subdirectory exists in the directory being built. If images are removed from the current directory, the corresponding thumbnails will be deleted the next time the directory is built. The default size of slide thumbnails is 100×100 pixels (maximum), but this can be changed in the configuration file.

Slide thumbnails will only be displayed if the index format supports them. Currently, only explicitly formatted or combined indexes support slide thumbnails.

### Default Thumbnail

The default thumbnail may be displayed when a directory or file does not have a thumbnail file (depending on the index format). The default thumbnail is stored in the "icons" directory, with the name "nothumb.gif" or "nothumb.jpg". The default thumbnail is entirely optional. If it does not exist, then no thumbnail image will be displayed for directories or files that do not have thumbnails.

Table of Contents