Best Batch Image Resizing Method for OS X

I’ve been looking for the simplest, free method to resize images. There’s SO many ways to do this, and the best way to do it for WordPress is over here. But if you’re doing stuff locally on your computer, I’ve found this method to be my favorite:

  1. Use OS X Automator because it’s free!
  2. Use the ‘sips’ command because it comes pre-installed.
  3. Leverage the ‘Folder Action’ document type.
  4. Attach a short shell script to that folder.
  5. Any image you drag into the folder will be duplicated and made into a 1200px wide image.

Step 1: Choose Folder Action

Choose “Folder Action” and be sure to set your target folder.

Step 2: Add a “Run shell script” module

You can set the target folder at the top of your script with the pulldown menu.

Step 3: Set the shell script to pass input “as arguments”

“As arguments” is key …

Step 4: Use this script

for f in "$@"
do
   sips -Z 1200 -s format jpeg -s formatOptions 70 "$f" --out "${f%.*}.jpg"
done

Step 5: Enjoy!

All you need to do is drag any image file into the folder of your choice and you’ll get a resized image!