Skip to main content

Batch resize images with imagemagic on Ubuntu

To resize all *.jpg images in a directory into a new directory, keeping aspect ratio do:

mkdir web && mogrify -resize 2200x -quality 95 -path web *.jpg
 

This will convert all *.jpg images (note last parameter) into the extra created subdirectory 'web'.

CAUTION: mogrify will convert existing images if the parameters are wrong. Do create a backup before using it!