Personal Image Sharing and Embedding
I’ve been looking at writing more of my blog posts on my iPad. However, up until I’ve recently been using Flickr for storing all my images and displaying them on my site. This has worked well in the past but has been a long winded - on the iMac, the image is copied into iPhoto and then uploaded to Flickr via that. Adding the image to the blog post is achieved by inserting the image using MarsEdit.
The issue is attaching the image inline on the iPad. Whilst I can happily upload images onto Flickr, I can’t then get the inline link attachment from the Flickr app itself. I could mess about with mobile Safari and the Flickr website, but the non mobile Flickr site is pretty poor on the iPad, so I’ve decided to go another way.
Transmit
Earlier in 2014, Panic released the excellent Transmit FTP app onto the iOS app store. My decision to move in this direction was influenced in no uncertain terms by Macdrifter. This guide helped me set out the path that I was to take.
I use the excellent Fastmail to host my email, which also comes with FTP space (5GB on my plan). This allows me to host a very basic website (csalter.me.uk and vox.me.uk) on the Fastmail servers - my sites aren’t popular enough to reach the bandwidth limits set, so it’s a good way of hosting a static site. However, this space wasn’t being used and and as I can host from this location, I decided that I’d upload images to here and have them linked to on the blog.
However, after some playing around with the basic idea from Macdrifter, it needed some tweaking to suit me, my host and my blogs.
Uploading and Resizing
When uploading to Fastmail for testing, I found that the images I was uploading were a bit big and were taking a while to download - the downside of hosting it off the Fastmail servers are that they’re great at email, but perhaps I was asking to much, hosting 5 x 5MB images per post on the server and getting Tumblr to resize them dynamically for me. So the best bet seemed to be to resize them before uploading them to the Fastmail servers.
On the Mac, I currently use ImageMagick to resize it with the commands:
<code>mogrify -resize 307200@ -format JPG *.JPG
mogrify -resize 307200@ -format jpg *.jpg
mogrify -resize 307200@ -format jpeg *.jpeg
mogrify -resize 307200@ -format png *.png
mogrify -resize 307200@ -format PNG *.PNG
</code>
This gives me a image that is about 640 x 480 (though if it’s in portrait, it’ll be 480 x 640 - the pixel count resizes approximately to this size and keeps the photo ratio). This is uploaded onto the Fastmail server with Transmit.
This allows me to copy and paste the URL of the image and paste it directly into my text editor.
I can now achieve the same on the iPad with the recently released Workflow app. The workflow can be found here. It basically takes a photo from your photo roll, resizes it to 640 x 480 and then allows you to open it using an extension, which Transmit has. This then lets you upload to the Fastmail server, using a previously saved bookmark.
Currently, it’s very basic as the iPhone/iPad version shown doesn’t take into account the orientation of the photo and so it’ll always output as 640 x 480, thus ruining portrait photos (like the image of the workflow above would be). I think this could be done in Python within the workflow app, but I would need to learn more Python for that!
Conclusions
With Workflow, I can easily take and upload pictures from my iPhone and upload them to Fastmail’s web service where I can then copy and paste the URL from Transmit into my Editorial app where I’m writing. Unlike my previous workflow of using Flickr, this allows me to upload to the same location whether I’m using my iPad or my iMac (or even my Windows work laptop, as occasionally happens!) In addition, I’m also retaining control of the images and in theory, I should be able to keep the URL’s the same in the future, even if I move from Fastmail as it’s on one of my domain names.
Overall, I’m pretty happy with the change. The only issue I do have is that Flickr would link to the full size image - my current setup only shows the smaller picture. However, I don’t think this is to much of a loss and it saves on the bandwidth on the Fastmail servers.
In the future, I could potentially look at using Hazel to automate some of the resize tasks on the iMac. Likewise, I have a small server with BuyVM - workflow allows me to run a script on something via SSH, so I could potentially have Workflow (and Hazel) upload an image to there, run a script to resize the image using ImageMagick and then move it to my Fastmail folder. But that’s for the future as it’s currently working fine at the minute.