Batch resizing images from the command line on a Mac

December 2016

If you need to quickly resize a bunch of images on a Mac, you don't need to open Photoshop. There's a simple way to do it from the command line, by using the sips command. This is the basic syntax:


Resizing single images

By way of example, to resize a single image to a maximum of 800px (either width or height), you'd use the following. It's important to note that this will replace the existing image, so make a copy you want to keep the original.

sips -Z 800 image.jpg

Batch resizing images

Where sips really comes into it's own however is for folders of images. To resize multiple images just use a wildcard (*) selector together with the file extension (.jpg in this case). The example below will blast through all the images in folderName, resizing them to 1200px in a flash.

sips -Z 1200 folderName/*.jpg

Your days of batch resizing images in Photoshop will be but a distant memory.

Ever wish you got more email?

Neither do I. You're busy, and so is your inbox. I'll only be in touch when I publish something new. And of course it goes without saying your email will be kept completely private.