Using ImageMagick’s convert to resize all jpg’s in a directory

Written by James McDonald

October 25, 2007

Using cygwin with ImageMagick installed you can resize entire directories of jpegs using the convert utility

for i in `ls *.jpg`; do convert -resize 30% -quality 80 $i conv_$i; done

The 30% made images with a resolution of 3072 x 2304 pixels (approx 1.6 to 2.1MB each) into 922 x 691 (approx 80KB to 140KB each)

Experiment with different percentages to get your desired size.


Submit a Comment

Your email address will not be published.

You May Also Like…

List your VSCode Extensions

Ever wondered what extensions you have installed and want to keep a list? This actually is a good way to audit your...