Quickly Resize, Convert & Modify Images from the Linux Terminal

This command will convert all the png files (with that suffix) with longest side to be 1080 pixels with quality of 50%. New files will be renamed as "converted-<OriginaFileName>"

 

for file in *.png; do convert $file \
-resize 1080 -quality 50 \
converted-$file; done

 

Comments