How to resize a Batch of Images in Linux all at once

NOTE: Tried and tested in Ubuntu 11.04 Natty Narwhal


To resize a batch of images we need to use a command line tool mogrify this tool forms part of the ImageMagick Libraries

To use the mogrify command line tool we will need to install ImageMagick

sudo apt-get install imagemagick

After the install locate the folder via the command line where the images are that need to be resized

cd /home/name/myPhotosResized

Type in the following command to resize the images in the myPhotosResized folder to 1280px in width and maintaining the original aspect ratio

mogrify -resize 1280 *.jpg

To force the images to resize to 1280×800 without keeping the aspect ratio use the following command

mogrify -resize 1280×800! *.jpg

Image Credits: Photo by Isis França on Unsplash.

More Similar Posts

No results found.