Batch Resize Images Quickly In Terminal

Batch Resize Images Quickly In Terminal
To sign up for our daily newsletter covering the latest news, hacks and reviews, head HERE. For a running feed of all our stories, follow us on Twitter HERE. Or you can bookmark the Lifehacker Australia homepage to visit whenever you need a fix.

Mac: Several applications can resize a bunch of images, but it often takes some time and fiddling. Like with most Terminal commands, it just takes a little string of text to get your images down to size fast.

MacLife points out this helpful command line trick. Simple navigate to the directory you want in the Terminal (using the cd command) and typing the following (or variation of it):

sips -Z 640 *.jpg

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 the larger size as well.

Terminal 101: Resize Images in the Terminal [MacLife]


Log in to comment on this story!