fancier images
Jun 26, 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.
What made things a bit more complicated was that with this I was also looking to create WebComponent(s) for a few sets of tags that were reused commonly, such as those around images in blog posts. There's not an awful lot to mention there, other than the post files look much cleaner using the custom component. The internal logic just exists to make it a little customizable including things like position and border style. From this effort components for images, multi-images, song-covers, and iframes (for the as of writing one youtube video embedded) were created. I've elected to exclude the game covers for now since I think the detail is pretty readable as is and they're all really just borrowed assets meant to make the page they're on look satisfying, which I think they do.
That isn't the only upgrade to images though, as I also wanted to introduce spoilerable images. This is mainly going to be for future posts, to allow more spoilery stuff to be posted, but I also chose to do it since a couple of the cover images for some recent games could be considered spoilery. It's a little bit of a stretch, but better safe than sorry and also is a way to test it out live in a small way. Along with this, the first site wide options and a page for them were introduced.
That's all for now- until next time!
tagged: technology, project:tasogare