Thumbnail a Directory
Here is a one liner to thumbnail all of the images in a directory:
What the script does & how to use it
cd to the image directory that you wish to make thumbnails of. This is also the directory that the thumbnails will be placed.
type in the script at the command line
125 is the width in pixels of the thumbnails (you can change the number for larger/smaller thumbnails).
It makes “tn-(image name).png” and puts it in the directory.
All of the original images remain the same.
- This also works with names with spaces in them.
You can make thumbnail images in minutes that would take hours to do in GIMP or other image manipulation programs. The script is very flexible, 125 (the number of pixels in width) can be changed to whatever number you wish, you can output them to .png or most any other image format you wish. The script is also non-destructive as it keeps the originals the same. This one liner is great for doing image galleries online or locally.For more code like this go to our one liner’s page.