This script travles a directory structure and creates thumbnails for each image and video (flv, avi, mov)

This script requires Imagick and ffmpegthumbnailer installed, this can typically be done with a package manager for the OS.

Base for search is hardcoded in the script as /data/images

Thumbnails are places below an image in a relative subdir called "thumbs/200pxHigh - If the Height Parameter is 200. eg. "thumbs/800pxHigh - If the Height Parameter is 800. Se "Directory Structure samples" below.

Image names are kept, movies get a ".jpg" appended to their filename

This Script is closely related to (hence used as part of) the:

Script for linking images into a Confluence page (

Executing the script:

./ height=200 startdir=/images quality=80 labelheight=10



Height of the thumbnails

StartDirThe Directory to start from
QualityThe Quality of the converted image, lower value = smaller size

Source of the Script:

Directory structure sample:

Original fileThumbnail for 200 HeightThumbnail for 800 Height