fancier images
26 Jun 2026 - digitalily
Among the minor things that I think enhance a website are images and how they're handled. Well, images in general obviously enhance a page, but it's the surrounding bits I'd been a bit concerned about. I have been using embedded images mainly in blog posts and in song/game pages, and while you could always right click to open in a new tab, it isn't a great experience, and is possibly annoying on mobile (which always finds its way into design decisions). And speaking of mobile, because of the area limitation many images would be way too small anyway, so something was needed.
Originally the thought was to just wrap the images in <a> tags, with to make them clickable and pop-up in a new tab, and while that functioned, it caused some friction with the css I use mainly for blog images to align them to one side or the other. I'm also not a huge fan of the extra browser tabs on my phone, and even on desktop it just doesn't feel like a great solution. I knew many websites had in-page viewers that expanded the image, included a bit of information about them, and allowed navigation, so I did some googling around and came across a javascript library called glightbox which does all these things. I was thinking of a way to roll my own solution, but having an open source library that works well (and in ways I don't yet even realize yet) is pretty great.