Upload images to imgur.com

It’s been a long time since my last post. Since I started school again, I’ve been focusing mainly on Java and iPhone development. But… I’m back with a new script that I think will be useful to a lot of people: Right click an image file and select “Upload to imgur”. Once the image(s) have been uploaded, your default browser will open a tab for each image.

If you don’t know imgur, it’s a free image hosting service where users can upload images anonymously and get a link to share with other people.

It’s written in AppleScript, but it’s wrapped inside an Automator workflow that has been saved as a Service.

In stead of writing out all the code here, I’ll just give you a link to the finished .workflow file in my dropbox (see below). If you want to check out the script or make edits, you can just open the file in Automator.

If you want to use the service, all you have to do is extract the .zip and copy the .workflow file to ~/Library/Services (that’s your user library, not the system library).

You’re free to modify and distribute the workflow in any way you want (non-profit, with attribution and link back to this page).

The handler that returns the user’s default web browser was written by StefanK at MacScripter and modified by me.

Download: With confirmation prompt or without confirmation prompt.

EDIT: If you can’t find your user’s library folder it’s because Apple has set it to hidden in Lion. To unhide it permanently, execute this command in Terminal.app: chflags nohidden ~/Library

If you just want to access the folder once and leave it hidden, select Go in the Finder’s menu bar, select Go to folder, and write ~/Library

Thanks to Reddit for making me aware of the omission.

EDIT 2: Imgur’s API allows you to upload images into a personal account in stead of anonymously. If anyone wants this feature, leave a comment and I’ll write up some instructions on how to edit the script.

EDIT 3: I hope none of you got your hopes up about EDIT 2 because that process was a little more complicated than I had thought :(