Thumbnail Creation of images
This plugin creates thumbnails for all of the images found under a specific directory, in various thumbnail sizes.
PIL to function properly since
PIL is used to resize the images, and the thumbnail will only be re-built
if it doesn't already exist (to save processing time).
Set up like any other plugin, making sure to set
PLUGIN_PATH and add
thumbnailer to the
IMAGE_PATHis the path to the image directory. It should reside inside your content directory, and defaults to "pictures".
THUMBNAIL_DIRis the path to the output sub-directory where the thumbnails are generated.
THUMBNAIL_SIZESis a dictionary mapping size name to size specifications. The generated filename will be
THUMBNAIL_KEEP_NAMEis a Boolean that, if set, puts the file with the original name in a thumbnailname folder, named like the key in
THUMBNAIL_KEEP_TREEis a Boolean that, if set, saves the image directory tree.
THUMBNAIL_INCLUDE_REGEXis an optional string that is used as regular expression to restrict thumbnailing to matching files. By default all files not starting with a dot are respected.
Sizes can be specified using any of the following formats:
- wxh will resize to exactly wxh cropping as necessary to get that size
- wx? will resize so that the width is the specified size, and the height will scale to retain aspect ratio
- ?xh same as wx? but will height being a set size
- s is a shorthand for wxh where w=h