One of the sites that I manage uses a jQuery-based image gallery to display images in a grid. The script decides which thumbnail to use based on how large and image is needed. A series of suffixes à la Flickr is used to signify classes of image size. I wrote the following script to automate the process of scanning a source folder and creating four thumbnail sizes to an output directory.
It’s all pretty self-explanatory.
Well, sort of. I don't think this is exactly what Flickr uses; and I made up the
_qsuffix for the less than 500px image. ↩