Version 1.1 by Normann P. Nielsen on 2026/11/15 15:43

Hide last authors
Normann P. Nielsen 1.1 1 This script travles a directory structure and creates thumbnails for each image and video (flv, avi, mov)
2
3 {{warning}}This script requires [[Imagick>>http://www.imagemagick.org/script/index.php]] and [[ffmpegthumbnailer>>http://code.google.com/p/ffmpegthumbnailer/]] installed, this can typically be done with a package manager for the OS.
4
5 Base for search is hardcoded in the script as /data/images
6
7 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.
8
9 Image names are kept, movies get a ".jpg" appended to their filename{{/warning}}
10
11 {{success}}This Script is closely related to (hence used as part of) the:
12
13 [[Script for linking images into a Confluence page (updateGallery.sh)>>Main.atlassian.atlassian-confluence.mos-eisley-gallery.script-for-linking-images-into-a-confluence-page-updategallery-sh]]{{/success}}
14
15 Executing the script:
16
17
18 {{code}}
19 ./makeThumbs.sh height=200 startdir=/images quality=80 labelheight=10
20
21 {{/code}}
22
23
24
25 Parameters:
26
27 |= Height| Height of the thumbnails
28 | **StartDir**| The Directory to start from
29 | **Quality**| The Quality of the converted image, lower value = smaller size
30
31
32
33 Source of the Script: [[https://bitbucket.org/moseiseydk/confluence-gallery/src/1ccb4aa93b95d321c7d5c29ea776f799819bc6d0/makeThumbs.sh?at=master]]
34
35 Directory structure sample:
36
37 |= Original file|= Thumbnail for 200 Height|= Thumbnail for 800 Height|= |=
38 | /data/images/MyCar/image1.jpg| /data/images/MyCar/thumbs/200pxHigh/image1.jpg| /data/images/MyCar/thumbs/800pxHigh/image1.jpg| |
39 | /data/images/MyCar/Styled/image1.jpg| /data/images/MyCar/Styled/thumbs/200pxHigh/image1.jpg| /data/images/MyCar/Styled/thumbs/800pxHigh/image1.jpg| |
40 | /data/images/MyCar/Speeding.avi| /data/images/MyCar/thumbs/200pxHigh/Speeding.avi.jpg| | |