Bulk resize and rename image files on linux

author's avatar
Kees de Kooter
Feb 16 2021 0:36

This command find all files ending with "large.jpg", resizes them to thumbnails of 80 pixels and saves them as *small,jpg". It uses the convert utility from ImageMagick.

find . -name "*large.jpg" -exec sh -c \
'convert -resize 80x80 ${1} ${1%large\.jpg}small.jpg' - {} \;