Created
October 30, 2019 07:01
-
-
Save gotev/1dbcf4315205f2a08e62ec627c4d851b to your computer and use it in GitHub Desktop.
Batch resize images
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sips -Z 640 *.jpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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