Skip to content

Instantly share code, notes, and snippets.

@gotev
Created October 30, 2019 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gotev/1dbcf4315205f2a08e62ec627c4d851b to your computer and use it in GitHub Desktop.
Save gotev/1dbcf4315205f2a08e62ec627c4d851b to your computer and use it in GitHub Desktop.
Batch resize images
sips -Z 640 *.jpg
@gotev
Copy link
Author

gotev commented Oct 30, 2019

So what's happening? Well, "sips" is the command being used and -Z tells it to maintain the image's aspect ratio. "640" is the maximum height and width to be used and "*.jpg" instructs your computer to downsize every image ending in .jpg. It's really simple and shrinks your images very quickly. Just be sure to make a copy first if you want to preserve their larger size as well.

Source: https://lifehacker.com/batch-resize-images-quickly-in-the-os-x-terminal-5962420

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment