Skip to content

Instantly share code, notes, and snippets.

@dotherightthing
Created August 15, 2019 08:39
Show Gist options
  • Save dotherightthing/1da80e24e8be417570b0e655e53ff5c0 to your computer and use it in GitHub Desktop.
Save dotherightthing/1da80e24e8be417570b0e655e53ff5c0 to your computer and use it in GitHub Desktop.
[Moving to the cloud, or not..] #cloudstorage #images

Moving to the cloud, or not..

Since devoting more time to writing up my travel journals, I've become increasingly aware of the burden that are my travel photos.

MacOS + Dropbox

My photos start their life on a smartphone or a Canon G1x. From their they're transferred to Dropbox, and then synced back to my laptop.

I can view images in-folder or using Photos. I don't really like the MacOS solution, it doesn't have great organisation, it's really slow to sync between devices, it doesn't work on Android, and iCloud is expensive.

Pros

  • Dropbox backs up everything, not just images

Cons

WordPress + Images

Pros

  • Images can't be tampered with
  • No extra cost (but only because my shared hosting has no explicit limit)

Cons

  • No support for categorising / tagging images
  • Geotags are stripped when uploading images (but I add this in with a plugin)
  • Directories and disk space soon fill up with resized variants
  • Only basic editing tools

While WordPress is great for throwing together a site and then iterating on the codebase to slowly bring it up to scratch, it is not good as a media manager.

Since HTTPS became an expectation for (Google) SEO, I've been feeling increasingly fed up with my current hosting, which only offers SSL as an expensive yearly add-on. It's time for a change.

WordPress + Digital Ocean + Imgix

Pros

  • Powerful in-blog editing
  • Edits are URL based and non-destructive
  • Separate crop coordinates for each image size (via Media Cloud plugin)
  • CDN optimised for images
  • WordPress integration via free Media Cloud plugin

Cons

  • Only basic folder support in Digital Ocean, no tags
  • WordPress still sucks for organising images
  • Rough edges in integration if not using Amazon S3
  • URL based edits mean that if you switch the service off you only have access to the unedited images on your cloud hosting
  • Requires separate cloud host to store images
  • Expensive (USD 512 for Digital Ocean Space + USD 1012 for Imgix, per year, every year)

The cloud has been the hot new thing for years now. When developing a website, there seems to be an automatic expectation that every part of your infrastructure will exist in the cloud. This supposedly saves you money by outsourcing data storage to 3rd party providers, and then (spending money on) using other 3rd party providers to access your cloud data in all kinds of useful ways.

My current hosts suggested a 'sister company' of theirs, which sold shared hosting that was actually cheaper than what I was currently paying, but backed by their reputation (doesn't that make them more of a parent company?). It came with free SSL (yay!) but disk space was definitely still going to be an issue.

So I read around and came up with the idea of hosting my media on Digital Ocean. Apart from having a nice name, they claimed to be Amazon S3 compatible. And it looked like it would only cost me USD 5 per month.

I installed the Media Cloud plugin for WordPress. It's a free plugin which claims to rival WP Offload, without all the bells and whistles. As a result the UI is stock WordPress, and some of the options are a bit confusing. But the setup worked and when I refreshed the page, (it took absolutely ages for the page to render because) it uploaded all the images to Digital Ocean.

The next step was to set up Imgix. Imgix is a specialist CDN for images, but they also offer image editing tools. Combined with Media Cloud this provides an easy was to crop, brighten and/or treat and watermark images, all while writing blog posts.

But pricing for Imgix is hard to estimate, they say USD 3 per 1000 master images, plus a few cents per GB of traffic. I think the blog will end up with about 9000 images, but it's unlikely that all would be accessed at once. On the other hand one post could get a lot of traffic, and I'm unsure if the CDN would just hand out a cached version or not.

Another thing that concerned me about Imgix was the amount of work that would be necessary to scrape all my treated images, if I ever ran out of funds to pay for the service. As a frequent traveller, I value new experiences over consistent income. It's through not-so-budget travel and setting up for remote work and contracting, that I've realised the value of money, and how important it is not to pilfer it on non-essentials such as SaaS subscriptions.

But I decided to give them a shot anyway, mainly because images are treated as second class citizens in my blog, and the thought of dragging them all into Pixelmator to freshen them up gives me a headache.

But upon entering my credentials into the set up page, I hit my first road block - my Digital Ocean secret wasn't accepted in place of an Amazon S3 key. It could have been the forward slash in the URL, who knows, but the illusion of harmony between the separate services was quickly shattered.

I fired off a help request, knowing full well that it was the middle of the night in America and that support would be slow in coming, if at all.

I went back over to my Digital Ocean Space to check the upload progress. There was no progress bar, obviously the API didn't provide one. The images were all in a 10/2018 folder, rather than the folder name assigned in WordPress. There were no thumbnails without hovering and waiting for a few seconds. And there was no support for tagging or organisation. Suddenly cloud hosting didn't seem quite so appealing.

WordPress + Flickr

And then I realised, I already have cloud based image storage, and it's free. Flickr.

Pros

  • Free 1TB storage
  • Terms of Use allow hot linking of images (if Flickr gets a mention)
  • Great editing tools (crop, brighten, effects, straighten)
  • Cross platform apps (I have an iPad)
  • Tagging and albums
  • Geotags are untouched
  • Offline viewing and editing (via in-app caching)
  • WordPress integration via Remote Media Libraries for Flickr (USD 49/6 months), including tag and album based searching

Cons

  • No explicit ownership of images could affect SEO
  • Flickr is based in the US and doesn't use a CDN
  • Long term outlook - Flickr sold to Yahoo, then Verizon, then Smug Mug, then who?
  • Crop coordinates are applied across all image sizes (no art direction without duplicating images)

The last time I used Flickr I used the phpFlickr library to display a gallery of images in my music website. It worked, but there was no integration with the WordPress media library and it felt slow and clunky.

But googling 'Flickr CDN' brought up a handful of sites all claiming that it was a satisfactory solution, so long as the featured image on the page was self-hosted for SEO purposes.

Flickr already has a built-in editor, and can be used offline to edit photos away from a computer. Sure, I wasn't using that fancy CDN stuff but so what?

Flickr + Zapier + Digital Ocean

This replaces Imgix with Flickr, but retains the benefits of the DO CDN.

Pros

  • Let each service do what it's good at
  • Flickr for editing and organisation
  • Digital Ocean for Backup and CDN

Cons

  • The free Zapier plan only allows for 2x two-step zaps
  • There doesn't actually seem to be a Zapier zap to sync to DO spaces, only droplets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment