Skip to content

Instantly share code, notes, and snippets.

@niraj-shah
Last active December 15, 2015 22:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niraj-shah/5332600 to your computer and use it in GitHub Desktop.
Save niraj-shah/5332600 to your computer and use it in GitHub Desktop.
Compress images to 1024x1024 if they are larger
# Resize images larger than 1024x1024
sudo mogrify -verbose -resize '1024x1024>' image.jpg
# Resize all images to 1024x1024
sudo mogrify -verbose -resize '1024x1024' image.jpg
# Resize all JPEG images larger than 1024x1024
sudo mogrify -verbose -resize '1024x1024>' *.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment