Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Images can be resized using mogrify from the ImageMagick suite:

`mogrify -resize 256x256 *.jpg`

But this will resize images so that the largest dimension is 256px, including images that are smaller than 256px to begin with (like 100x100px avatars).

How can I exclude the smaller images from being affected? i.e. I want the largest dimension to be no more than 256px

(Preferably I will be able to do this with ImageMagick suite, or at least without installing anything additional).

share|improve this question

1 Answer 1

up vote 5 down vote accepted

try mogrify -resize '1280x1024>' *.jpg do make sure to backup though.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.