Blog news: self-hosting photographs

A few months ago I noticed that the home page of this site was taking multiple seconds to load. Common wisdom is that a “good” loading time is under 200ms, and even though a photo blog such as this might be a bit slower than a text-heavy site, multiple seconds is just too long to wait.

The best lead I had as to why this was taking so long was the comment inserted by the WP Super Cache plugin at the bottom of every page recording how long it took to generate in seconds. This was frequently more than 3 seconds which suggested that the problem was either my web server being too slow or a problem with my WordPress setup. Discounting the first as unlikely, I did some reading up on WordPress performance-tuning. The most practical advice was to minimise the number of plugins you use, and turn off each plugin in turn and check the effect on load-time before and after. I use few plugins but had been fond of Flickr Justified Gallery for displaying my Flickr-hosted photographs, and of course this was the culprit. The problem is not the plugin itself but Flickr’s own API—generating each gallery requires a query to Flickr to retrieve the list of photos in the album.

My preferred solution was to host my own images. This blog is 14 years old now and as I learned last year, third party services can disappear or change unexpectedly. Sadly the built-in gallery layout with WordPress 4.x remains an old-fashioned looking grid of square thumbnails that can fail to represent the underlying photograph properly (example). The JetPack add-on comes with a more attractive gallery layout but automatically uploads and serves all your images from their servers, which has its own downsides.

I looked at a number of third-party gallery plugins but anything outside the WordPress core also has the same “third-party risk” as Flickr: the code could stop working in the future, breaking all my old posts. None could also match the slick efficiency of Flickr’s upload workflow for optimising, arranging and captioning images. Fortunately while I was investigating this, WordPress released their new Gutenberg Editor. This comes with a new Gallery, the first version of which was a bit buggy but has the modern look that I wanted, and has improved over the last few months. (At time of writing there remains a bug where clicking on any photo in a gallery displays the first photo in the gallery not the one you clicked on. This is due to be fixed in mid-January.)

Switching to the new gallery improved page-generation times but without Flickr to optimise my images, I need to do this prior to upload to keep page-load times acceptable. This involves a two-step process:

  1. Use ImageMagick to resize images to no more than 2048 pixels on their longest edge: mogrify -resize 2048x2048 *.jpg (be careful, this changes the original files!)
  2. Reformat to be progressive JPEGs and apply lossless optimisation. There are a number of tools that can do this but ImageOptim is an efficient open-source drag-and-drop option for MacOS.

The final tweak, as recommended by Google’s PageSpeed Insights tool, was to defer offscreen images. This should make the initial page render faster by not loading images that are not yet viewable, and was already available as part of the Jetpack add-on (Lazy Load Images).

Software Review: On1 Photo RAW 2018

On1 Photo is one of the many editing applications I use to process my photographs. I have previously written about my journey from using a single application (Apple’s Aperture) to many so an update post about the latest version seemed overdue. [Due to a delay in publishing this article, RAW 2019 is now available and 2018 is no longer the latest version!]

The upgrade from On1 Photo 10 to On1 Photo RAW had been a bit bumpy. The new features were great but some older ones had not made the transition. While I did not directly experience too many bugs, there were frequent bug-fix releases with the consequence that it seemed like every time the program was opened it wanted to update itself, interrupting my photo editing session. Consequently I did not rush to upgrade to the 2018 version when it was announced, the new features were not initially compelling and the current version was working well enough.

A few months ago I received a significant discount offer to upgrade. (This was before On1 had announced the 2019 version.) I also noticed that their most recent point release (free upgrade within the 2018 version) had added the ability to manage RAW+JPEG pairs in Browse.  Since this is how I shoot, I had found managing the sets of files separately to be tedious and been looking for a better file management solution.  I was also looking forward to trying out the panorama feature since I capture them too infrequently to invest in dedicated panorama software.

Immediately after starting with Photo RAW 2018 I realised that this was a more significant upgrade than I had expected. The interface felt comfortably familiar but also subtly tweaked to be more streamlined to use. The performance was significantly better too—I could not help feeling that this was how Photo RAW should have been at release, and had now arrived after 18 months of feedback and iterative improvements. 

If you were disappointed with the initial release of On1 Photo RAW then I can thoroughly recommend the upgrade to the 2018 version if you have not settled on some other tool instead. I have not upgraded further to the 2019 version, for similar reasons to why I did not upgrade to 2018 at the beginning. I am also waiting for Luminar 3 to be released since its promised libraries feature is very similar to the browse functionality that I use extensively in On1 and it will be interesting to compare them before committing my money. If you have yet to try On1 Photo RAW then their extensive collection of video tutorials is the best starting point—they can really help you understand how to get pleasing results from it.