Batch resize JPEG images with maximum resolution and size

Just discovered a quick and dirty way to resize a bunch of jpeg files to a maximum resolution and size:

mogrify -resize 1024x1024 -strip -define jpeg:extent=200kb *.jpg

This command will resize all jpg images in the current directory with a maximum resolution of 1024px for each side (maintaining aspect ratio) and a maximum size of 200kb. This will also strip all metadata from the jpg files.


Leave a comment

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.