A few months ago, I started using a bit of software called Koken to publish a kind of portfolio of my photos. I loved it, and was really happy to have somewhere to display my favourite photos that was tailored to my own needs and – more importantly – on my own server and under my own control. I was about to write a review of it when I had to switch to nginx as a web server rather than Apache and managed to break everything. After a lot of work, I got all my other sites sorted out, but I had a series of problems with Koken. One of the issues was that the current version of PHP at the time had a bug that meant that the image manipulation utility GD was producing really blown-out, over-exposed thumbnails. It looked horrible. The developers at Koken had submitted a patch to fix the bug, but it didn’t make it into PHP until version 5.5.11. I also couldn’t quite manage to get the nginx setup right, so the URLs were malformed. To cap it all, while messing around trying to switch to ImageMagick to avoid the GD bug, the server continually filled up the
/tmp partition with error logs, ‘swapped‘ like it was going out of style, and almost ground to a halt. I still don’t know quite what happened, but I’ve never managed to tax my mighty Linode Virtual Server like that before, so it must have been some seriously Bad Stuff. Not wanting to bring down all my sites, I decided to leave it until the patched PHP was released, then try again, and deleted all the files on Wings Open Wide to avoid any problems. Anyway, now that PHP is patched for the GD bug, I’ve set it up again, so I thought it was about time to write that review.
I’ve had a Flickr account for years1, but while I still post photos there every now and again, it isn’t quite what it was. The social aspects of sharing photos there diminished in the years that Yahoo let it lie fallow, and people have moved on to sharing photos on Instagram, Facebook or Twitter. I think the recent changes have improved the design somewhat, but it doesn’t feel like mine somehow. Also, I have tended to post all kinds of images there in the past, from quick snaps on the phone to screenshots and so on, because it’s conveniently easy to post to and share from. What I wanted was a more curated, selective space to show the photographs that I was most proud of, that would also allow me to embed images on this blog2.
I also tried Smugmug for a while. It’s good, and the design tools are very effective. I think if you don’t have your own server space, then it would be a very good choice. They also have all sorts of e-commerce tools built-in, so that you can sell copies of your images, if that’s the kind of thing you’re interested in. However, if I had found Koken before Smugmug, I would have gone straight for Koken: even though setting it up and maintaining it is more of a chore than a web service where someone else does that for you, the advantages of having total control of how your photos are displayed, on your own server, are well worth a bit of extra hassle.
And – my nginx woes notwithstanding – it’s actually really easy to set up. You just download a single PHP file, upload it to your server, then visit the page, which runs an automated installation script which prompts you for the relevant details. All you have to do manually is create a MySQL database to hold the images, and make sure that you have either GD or ImageMagick installed to deal with resizing images. That’s all there is to it. Once it is running, you can access a web application for managing the images and the design of the site that are comparable in quality and ease of use to a desktop application. You can drag and drop images around, create albums and so on. There are a number of built-in (free) themes which are excellent and can be tweaked considerably to get the look you want. I chose to pay for one of the non-free themes (Regale), partly because I wanted a way to give some money to the developers (Koken itself is free to use), and partly because it’s a lovely theme.
One of the most impressive things about the themes is that they are responsive, and adapt seamlessly to different sizes of screen from a big desktop display to an iPhone. Unless you’re really good with CSS, that’s difficult to achieve yourself. If you click the images, you also get a nice ‘lightbox’ display in which you can manually move through an album or the whole collection, or run a slideshow full screen. Koken also makes it easy to create static pages or what they call ‘Essays’, which are pages with both text and images. These allow you to insert images from your library easily, and allow you a lot of control over whether the title, caption and so on are also shown. I’m not sure that it’s something I’ll use, because I would rather have my words on this blog (and embed images from Koken here), and keep Wings Open Wide for images only. However, for someone who wanted to produce a travel blog or something similar, it would be a wonderful tool.
There’s also a Lightroom Plugin for Adobe Lightroom which makes it fantastically easy to publish any photos you choose to the site, and to create or edit albums or sets. If you add tags, titles and captions in Lightroom, those are carried over to your Koken pages. This removes a lot of the friction I’ve felt before when trying to set up a workflow for publishing images, and it also enables you to update images in place if you edit them further in Lightroom after first publishing.
For what it’s worth, it turned out to be really easy to set Koken up with nginx after all. The key to properly formed URLs it seems is to put the Koken files at the root of your server (i.e. don’t put them in a ‘koken’ subfolder), and then to configure nginx.conf with the location rules given in this gist. I suspect that when I was trying to fix it before, I kept trying more and more potential solutions, in the process setting off an avalanche of problems that just got me in more and more of a mess. Sometimes technology is like that, and you need to step back from it – or just start again. I’m really glad I tried again, though, because Koken is wonderful.
Go and have a look at what it can do.