Upload and Share your Mac screen grabs in seconds with Automator
I’ve always wanted a simple app which lets you easily upload and share screenshots. There have been many attempts, but none have been quite what I need. I’ve always used TinyGrab, but this is no longer maintained, and has a couple of annoying quirks such as spaces in the filenames. Other solutions such as GrabUp and ScreenGrab have long disappeared, and the likes of Jing are just spammy and unnecessary.
This lead me to try and find my own solution. I’m not a developer, so I needed to either hire a developer (money) or attempt to make my own (time). Thankfully, I remembered playing with Automator before and thought, maybe this could solve my problem. And it did.
It’s quite a hacky solution and takes a little bit of time to get set up, but once done it’s incredible easy to upload and share your screengrabs. Ready? Here goes..
Firstly, let’s take a look at Automator. We’ll be using what’s called a Folder Action to capture the screenshots you take and upload them to FTP. So go into Automator, and you’ll be presented with this start screen: Click Folder Action and then Choose. This will set Automator up to listen to a chosen folder and upload any new files in there. For the actual screen grab capture, we’ll be using the built in OS X tool (cmd+shift+4). The built in tool, however, saves by default to the desktop. Whilst this is usually fine, if we’re capturing every file saved to the desktop and uploading it, this could cause some issues. Instead, I decided it best to create a specific location just for screengrabs. I chose ~/Pictures/screengrabs/. You’ll need to create this folder in Finder, first of all. Once you’ve done that, we then need to tell OS X to save screengrabs to the directory we created. This is done with a couple of lines in Terminal:
defaults write com.apple.screencapture location ~/Pictures/screengrabs/
Obviously replace ~/Pictures/screengrabs/ with whatever directory you’re using. Next we need to tell Automator what to do. For this, we’ll need the Upload to FTP Automator action. You can get it here. Once you’ve downloaded it and gone through the installation, go back to Automator and quit (cmd+q) it. Then open it again, and choose Folder Action as before.
We’re now ready to build our Automator workflow.
First, we need to tell Automator where to look. We get a context menu for this at the top of our screen:
In this context menu, hit Other then choose the directory you selected earlier.
Now the first problem I like to solve with the screengrabs OS X creates is the spaces in the filenames, because spaces shouldn’t be in filenames. I used 2 ‘rename’ actions for this, to replace to two bits of text in the filenames which contain spaces. Type ‘rename’ in the search box in Automator, and drag the ‘Rename Finder Items’ action across twice. You’ll be asked if you want to add a ‘copy’ action, but just click Don’t Add for this.
I’ll leave you to work out the text replacement mostly for yourself, but it’s pretty simple. Here’s how I’ve configured it.
Remember to include all the spaces!
Next we’re going to tell Automator to upload the screenshot to FTP. In the search box, type FTP and drag across the Upload to FTP action we added earlier.
Put in the FTP details for your FTP server, as well as the URL which your screenshots will be served from. It should look something like my example above.
So we’ve told Automator to upload our screenshot, but now we want to share it, so we need to get the link to the image. This is a pretty easy step. Type ‘copy’ in the search box and drag ‘Copy to Clipboard’ across. This action requires no configuration.
Once this is added, we’re ready to go. You now need to save this Folder Action in order to get it running. Go to File->Save.. and type a name for the action. You call call it anything you like.
Once it’s saved, you can quit (cmd+q) Automator. The Folder Action should now be listening and ready to go. Try taking a screenshot using the normal means of Cmd+Shift+4. Depending on the size of the screenshot and your connection speed, you might need to wait anything from 10 seconds to a minute or two, but eventually the link to the uploaded screenshot should be copied to your clipboard.
If you keep an eye on the menu bar, you’ll see a little cog wheel at some point. Once this has been and gone, the link is copied to your clipboard.
If all works, great! Otherwise, go back and check everything’s set up properly, and if you struggle to get it working, comment below and I’ll try to help.
Happy grabbing 🙂
Note to Retina MBP users
For Retina MacBook Pros like mine, it is important to note that the screenshots will be double the size you see on screen, as this is how Retina works. In order to display screenshots at the right size, you can do 2 things. Firstly, you can resize the image in Automator (I’ll leave you to work out how), but bear in mind that although this will display great on non-retina devices, for Retina users it will appear blurry. A better way to do this would be to present screenshots through a webpage which displays them at half their resolution. I did this with PHP by taking the width and height of each image, dividing it by 2, and echoing the HTML for displaying the image at 50% size. This will look perfect on retina displays.