Visit Colin D. Devroe's column >>

COLIN D. DEVROEHome Page

Mac geek and programmer.
Add To Watchlist
Articles Posted: 8; Links Seeded: 14
Member Since: 1/2006Last Seen: 11/16/2008

Exporting photos from iPhoto for use on your web site using Automator

Automator workflow. To view large, click the "screenshot" link within the article.

advertisement

I saw that someone was having a little trouble using for what seemed like a relatively simple task. I'm not sure at which point this particular person gave up - but what I think may have happened is that they simply overlooked the fact that 1) Automator allows you to combine many actions for several programs into one workflow, and 2) you can even use scripting languages like AppleScript from within Automator should you get stuck.

We're not going to need any scripting languages to pull off what this person wants, but is nice to know that you can use just about any scripting language from within Automator to make-up for Automator's shortcomings.

Here is what the person wanted to do.

  1. Select an album that I want.
  2. Export these photos into 800×600 (or the equivalent aspect ratio) to ~/Desktop/[Album Name]/[original file name].
  3. Export these photos into 120×90 (or the equivalent aspect ratio) to ~/Desktop/[Album Name]/_thumb.[original file name].

The part that stumped me the most is actually using the album name from iPhoto as the name of the Folder. Unfortunately I was unable to get this to work, then again I am not using any scripting in my workflow - so I am guessing that this would be possible if I had.

Details of the workflow (screenshot):

1. Ask for Photos

This action will open up a dialog window that will allow you to select the photos, or entire album, that you'd like to export.

2. New Folder

This is the action that you have to look closely at. The New Folder action, which comes from the Finder group of actions, is not only to make a new folder - it also allows for the input of files to it. Here is how Automator describes the valid input for this action: (Files/Folders) If files are passed into this action they are copied into the new folder.

This action is set to ask you for a folder name, so it will prompt you for that name.

Typically you'd need to run a "Copy Finder Items" at this point since you wouldn't want to scale your original photos. However the New Folder action does this automatically, which saves us a step. However, this action also "adds" a step.

3. Get Folder Contents

The Automator experts out there may have a better way of handling this, but if I skip this step I am asking Automator to resize a folder name, not the actual files (so the workflow simply does not work properly). With this added action, I push all of the files from within my newly created folder to the next action.

4. Scale Images

This action can be found within the Preview set of actions. It is pretty straight forward in that it resizes your newly exported photos by a specified amount, or by a percentage.

5. Create Thumbnails Images

At first I thought I'd need to run the Copy and Scale actions again in order to create the thumbnails but Automator has an action built in for this. This action will create a thumbnail with any specific suffix added to it, therefore leaving you with two files per original file - one scaled image and one thumbnail of that scaled image.

This workflow could have been extended to uploading the entire folder to my FTP server of choice, but I left that bit out thinking that perhaps someone would want to open the scaled images in Photoshop or, add them to their favorite WYSIWYG editor, etc. Happy exporting!

Want to see this workflow in action, you can download the workflow.

This article has been cross posted from TheUberGeeks.net - you may read it there if you'd prefer.

  • 8 Votes
  • Enjoy this article? Help vote it up the 'Vine.

Back To Top

Published to:

What's this?
Who's leading the conversation?
This visualization below allows you to see the impact that each user has on the current conversation. The top row contains the group of users who have had the most impact, the 2nd row the group of users who have had the 2nd most impact (et cetera). Users with similar impact are grouped together, and the average score of the group is shown to the left of the group. The author of the article is also shown on the left, in their corresponding group. Each user's score is based on the number of comments the user has made plus the number of votes their comments have received. The scores are calculated relative one another, so while their absolute value is not particularly important, their relative difference does indicate a larger difference in impact on the conversation.
3.3
{"commentId":318647,"authorDomain":"brianford"}

Automator is probably one of my favorite Apple apps -- and the one I think to use the least.

{"commentId":318647,"threadId":"46246","contentId":"388534","authorDomain":"brianford"}
  • 2 votes
Reply#1 - Fri Oct 6, 2006 10:00 AM EDT
{"commentId":318649,"authorDomain":"cdevroe"}

I am with you there. I went through a phase where I was trying to use it for everything. Then, for some reason, I stopped trying to automate my tasks and stopped using it altogether. I think it is time I take a fresh look at what I do each day, and make some workflows to help out.

{"commentId":318649,"threadId":"46246","contentId":"388534","authorDomain":"cdevroe"}
  • 2 votes
#1.1 - Fri Oct 6, 2006 10:02 AM EDT
Reply
{"commentId":318786,"authorDomain":"osx"}

Yeah Brian, Automator rocks.

{"commentId":318786,"threadId":"46246","contentId":"388534","authorDomain":"osx"}
  • 1 vote
Reply#2 - Fri Oct 6, 2006 11:37 AM EDT
{"commentId":318791,"authorDomain":"gzirra"}

Nice write-up. I usually employ Photoshop's Batch command with recorded actions, but there have been plenty of times I could've just used this handy method. Now if I only remember to use it next time!

{"commentId":318791,"threadId":"46246","contentId":"388534","authorDomain":"gzirra"}
  • 3 votes
Reply#3 - Fri Oct 6, 2006 11:44 AM EDT
{"commentId":318805,"authorDomain":"cdevroe"}

Some of the things Photoshop is able to do are much more powerful (out of the box) than what is within Automator by default. The main problem is, Photoshop doesn't ship for free on every Macintosh, and Automator does. So this solution seems to work for more people.

That being said, I still like Photoshop Droplets for many more advanced things dealing with the photos themselves - but Automator wins when it comes to extending those photos and using them in other applications.

{"commentId":318805,"threadId":"46246","contentId":"388534","authorDomain":"cdevroe"}
  • 1 vote
#3.1 - Fri Oct 6, 2006 11:51 AM EDT
Reply
{"commentId":319416,"authorDomain":"LAUHAL63"}

Thanks. I've clipped this to use when I get off of my butt & start working with my pictures.

{"commentId":319416,"threadId":"46246","contentId":"388534","authorDomain":"LAUHAL63"}
  • 1 vote
Reply#4 - Fri Oct 6, 2006 6:12 PM EDT
{"canLink":false,"threadId":"46246","isPrivate":false}
Leave a Comment:
You're in Easy Mode. If you prefer, you can use XHTML Mode instead.
As a new user, you may notice a few temporary content restrictions. Click here for more info.
{"threadId":"46246","contentId":"388534"}
Start TrackingStart Tracking
Stop TrackingStop Tracking