Resize images with Automator
Mac Tip #280/14-March-2007
A friend recently complained of tedious amounts of time spent resizing photos and screenshots, which led me to explain how Automator can help. I mentioned Automator back in Automate It, Tip #195/11-May-2005.
I have a Finder folder of photos from my digital camera. In my case, each image is 2 or 3 megabytes, and maybe 3,888*2,952 pixels.
If I want to add some of these to my blog they need to be resized to more like 640*480 pixels and a much smaller file size.
Set up the action
Because I only ever work on copies of photos, and never the originals, I first copy the ones I want to resize to another folder and select them.
Click any image in this post to see a larger version.
Set up the Automator workflow
To resize selected photos open Automator (in the Applications folder). In the Library column on the left select Finder. From the Action column in the middle select ‘Get Selected Finder Items’ and drag the action into the large, empty Workflow area on the right.
Next select Preview in the Library column, and drag ‘Scale Images’ from the Actions column to the Workflow area. Make sure it goes below the ‘Get selected Finder Items’ action: actions occur in the order they appear in the workflow.
When you use ‘Scale Images’ an alert will appear asking if you wish to make a copy of the selected items before you change the image files.
I had already made a copy of my files so I chose ‘Don’t Add’, but ‘Add’ is always a safe choice.
After the ‘Scale Images’ action is added to the Workflow, enter the size in pixels of the desired longer side for your resized photos.
View results is a good check
The next step is optional, but useful. Select Automator in the Library column, and drag ‘View Results’ from the Actions column to be the last step in the Workflow.
Run the workflow
Finally, click the Run button. Automator resizes all the selected photos and reports the results in the ‘View Results’ area.
The resulting photos
The photos have been resized and each is now about 100Kb. This is a larger filesize than a dedicated (and expensive) program such as Photoshop would create, but this is a quick and free action.
Many actions are available
There are many other actions you can use, including changing filenames to lowercase, and opening the images in Preview. Explore Automator’s Actions list to find other actions you may wish to add to your workflow.
Save a workflow
If you think you may want to use this workflow again, choose Save from Automator’s File menu and save it to your computer. Tip: make the filename expressive: I called my workflow ‘resize-to-640′. Next time you want to resize a batch of photos in that same way double-click the workflow, select photos in the Finder and click Run in the Automator window.
(Updated December 2010) Download my Resize images workflow here. It’s a 70Kb zipped file, and includes an action to change the filename to lower case: 2010 version MacTips resize images workflow (70Kb zipped file).
Update May 2009: I’ve moved the screenshots to a new location so the thumbnail sized images should be larger.
Update March 2011: Albert Medalla pointed me to a short video he made that shows almost exactly the instructions above. His video is embedded below.
Please subscribe to the MacTips channel.