Batch image resize

To mass resize image files, you need ImageMagick

yum install ImageMagick

To resize:

cd image-folder/
mogrify -resize 800px *.jpg

Note: 800px is the width, it’ll keep the aspect ratio of the image

magic-hat
Imagic
Share this...
Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInPin on Pinterest

2 thoughts on “Batch image resize”

  1. It didn’t work. I have a folder of jpg images (about 400). When I run the command above I get:

    mogrify: invalid argument for option `450px’: -resize @ error/mogrify.c/MogrifyImageCommand/5755.

  2. Ahhhhh.. Got it.

    Use: mogrify -resize 800x *.jpg

    Without the p (800x vs 800px)

    800x represents width while x800 represents height

    I used “mogrify -resize ‘450x>’ *.jpg”

    Any image larger than 450 was resized to 450 ~ while smaller images kept their respective size.

Leave a Reply

Your email address will not be published. Required fields are marked *