Automation #3 – Resizing Photos Using Automator

Photo JPG files from modern digital camera has a high resolution that is often not necessary if you are posting the photos on the web for viewing. For example a 10M pixel camera typically produces photos in 2816×2112 resolution. For web viewing purpose, you might want to scale down to 1024 or 800 pixel for faster uploading and viewing.

You can use iPhoto or Preview to scale JPG file, but Automator can help you automate the process if you have large number of JPGs.

For this tutorial, we are getting Automator to automate the following:

* Prompt to ask us to choose the photos
* Copy the photos to *Pictures>output* folder so that original photos are not changed
* Apply resize action to the photos in the *Pictures>output* folder.

We are going to create an Automator **workflow** for this task, and will drag the necessary **actions** from the library to the workflow to achieve the above tasks.

### 1. Start up Automator

![OS X Automator](/wp-content/uploads/2009/07/automator-startup.png)

When you start up Automator, a dialog box is displayed for you to choose a starting point for your workflow. Click “Custom” starting point for this tutorial.

![OS X Automator 2](/wp-content/uploads/2009/07/automator.png)

On the left side of your workflow window is the **Library** pane where you can find the list of available actions. Apple has provided over 250 actions for your automation tasks. You are out of luck if what you required is not in the Library.

To add an action to your workflow, just drag the actions from the library and drop it into the workflow area on the right.

### 2. Add “Ask for Finder Items” action

Look for the action “Ask for Finder Items” in the library and drag it to the workflow area. This action will prompt us to choose the JPG files from Finder.

![OS X Automator Action 1](/wp-content/uploads/2009/07/automator-action-1.png)

Specify the folder to start for the selection of your JPG files. Tick to select the option “Allow Multiple Selection”.

### 3. Add “Copy Finder Items” action

“Copy Finder Items” action will copy selected items in step 2 into specified folder.

![OS X Automator Action 2](/wp-content/uploads/2009/07/automator-action-2.png)

On the “To” option in this action, select the folder to output the resized photos. In our example, this folder is *Pictures>output*.

### 4. Add “Scale Image” action

Add the “Scale Image” action to the workflow. Specify the desired image size. In our example, we resize the photos to fit into 1024×1024.

![OS X Automator Action 3](/wp-content/uploads/2009/07/automator-action-3.png)

We have completed the workflow in few simple steps. You can run the workflow now by clicking on the **”Run”** button on top right corner.

Save the workflow in order to reuse this workflow in future. Choose File>Save and enter a name and location for the workflow.

![OS X Automator Save](/wp-content/uploads/2009/07/automator-save.png)

You can save the workflow into the default workflow file which has a “.workflow” file extension. Or you can save the workflow as an application with a “.app” extension. When workflow is saved in application format, you can simply run the workflow directly from Finder by clicking on the workflow “.app” file.