How to Batch-Resize Images with Automator
Posted 09/27/2012 at 11:14am
| by Susie Ochs

Let Automator handle the heavy lifting
If you find yourself performing the same actions on your Mac again and again, open up Automator and see if you can program a workflow, which you can save as an application and run from your Dock or with any application launcher. Alternatively, you can set up a Folder Action, which means that Automator watches a specified folder, and anything you put in that folder gets processed instantly.
In our example, we’ll set up an Automator workflow to resize images for our blog, save them as JPEGs, and rename the files. But poke around Automator’s actions library and you’ll probably find ways to speed up your own most-performed tasks, too.
1. Choose a Type

When you launch Automator, the first pane asks what you’re creating. Applications work just like any app on your Mac. Services show up in the Services menu in your apps and when you right-click things in the Finder. Print Plugins show up in the Print dialog, accepting PDFs as input. Folder Actions perform the workflow on any files dropped into a certain folder. Calendar Alarms execute the workflow at a certain date and time. And Image Capture Plugins appear in Image Capture, accepting images as input. When in doubt, choose Workflow--these run in Automator and can be re-saved as another type later by going to File > Convert To or pressing Command-Option-Shift-C.
2. Peruse the Library

Click the Actions tab toward the top-left, and expand the Library list just below it. For our example (prepping images for a blog), we’ll click Photos, which displays a list of photo-related actions in the adjacent pane. Browse through them with the arrow keys, and you’ll see a description of each action in the pane at the bottom of the window.
3. Drag Actions to the Workflow

Since we want to resize images, we’ll drag Scale Images into the Automator workflow. Automator helpfully asks if we’d like to insert the Copy Finder Items action before it, so the images we resize are just copies, not our originals. Good idea. We click Add, and both actions are added to our workflow.
4. Specify Details

Actions often need a little more direction from you. In the Copy Finder Items action, we can select where the copies should be saved (default is Desktop). In the Scale Images action, we can specify the pixel length of the longest side. Next we’ll drag in Change Type of Images, and specify JPEG.
5. Rename the Output

We also like to rename our resized images with the date and pixel size, so we’ll select the Files & Folders category under the Library list, and drag in the Rename Finder Items action. This action has a drop-down that specifies what the action does. We’ll pick Add Text, and add -600 to the end of the filename. Then drag in Rename Finder Items again and choose Add Date or Time to slap the Date/Time Created before the filename.
6. Test it Out

Since this is just an Automator workflow so far, to test it we need to add Ask for Finder Items as the very first action, to give it some files to work with. Find it in the Files & Folder section (or use the search box) and drag it to the very top of the workflow. Then at the top-right of the window, click Run to test the workflow. You’ll be asked to select some images in the Finder, and the workflow will run and process those images.
7. Save It

If everything works as you expected, you can then delete the Ask for Finder Items action from the top and press Command-S to save the workflow. You can change it to an application here (if you want to just drop files onto the app icon), or choose File > Convert To to create a Folder Action (just drop the files into the folder), or an Image Capture Plugin.