New Image Gallery
Thursday, January 19, 2017
I've been working a little more on restyling the image gallery. I decided the square thumbnails were looking a little dated so wanted to move towards something that looked a bit more like the tiled effect you may have seen on sites like flickr and pintrest. I had a look first of all to see if there were any pure CSS solutions but as yet there doesn't seem to be support for floating the images together so that they fit without gaps.
Old Layout
New Layout
After a little research it seemed that JavaScript was the way forward as it can be used to calulate a suitable arrangment when all the images have loaded (if you're interested, this is the library I'm using though it looks a bit better on their site at the moment - miromannino.github.io/Justified-Gallery/). Right now that means a bit of a delay waiting for all the thumbnails to finish loading before they can be displayed. This can feel a bit slower than images displaying as soon as they have loaded, which is what currently happens when moving between albums. I'm hoping to optimise this further over the course of the next two weeks, but for now I've added a little loading animation to keep you interested whilst you wait for the pictures to load.
Let me know in the comments if you experience any particularly long delays on any of the albums. Thanks.
![]() | Posted by Ben Taylor at 21:18 |
comments 1 |