Published by Niels on 10 Dec 2005 at 08:50 am
Making a usable Picture Gallery
Generating picture galleries proved to have a steeper learning curve than anticipated. The originals were kept and somehow the thumbnails that the gallery plugin created were 60+ KB. After some searching I found out that ImageMagick, which is used to create the thumbnails, retains the EXIF put in the photo by the camera. Since this can easily be 60 KB it means that the size of the thumbnails is always larger than 60 KB.
To fix things the originals were reduced to 60% of their original size and the EXIF data was stripped from the pictures. I used the following command:
mogrify -thumbnail 60% *.JPG
This already greatly reduced the size of the ‘originals’ without losing too much quality when viewed on a website. Since this has also stripped the EXIF data the thumbnails are now a mere 8 KB in size. This keeps the bandwidth low and makes the download of the gallery page faster.
This site has very nice examples and explanations on using the ImageMagick tools to create thumbnails.