
JXL Hell
So, JXL or Jpeg XL is a new format from 2021. My “easy way” to describe it is jpeg, but with the lossless and transparency of PNG, and GIF animation, with half the size. (it’s probably incorrect and a very dumb way to explain, but it works!). I like it so much in fact that that most of my images on back-ups and etc. have been converted to it (featuring a touch -r command to keep the metadata intact), and a special thanks for most Linux distros to support it out-of-the-box, and for Mac I use JXLook which met my expectations flawlessly.
The problem being, as far as I’ve looked into it, Google also has their competing standart (the hated) WebP. Which means that the biggest browser in current times argue there’s a lack of interest in the ecosystem.
Okay, so far, it’s commom competing-formats stuff, long are the days of BluRay vs. HD-DVD (which btw, are literally dying, where do I come into the story? Well, I tried to add JXL support to my (this) site! It looked easy enough, there’s JXL.js which decodes JXL images using WebAssembly and caches it for future use. It looked good enough on npm run dev, all working, time do deploy- Yeah, it didn’t work.
I have -1 knowledge on JavaScript (it used to be -5 but I got some stuff from memes), but as far as I could get, when building, there’s was an error when creating the Worker('jxl_dec.js'); I believe it’s due the weird way Astro converts paths when building? After some trying, I didn’t get anywhere, and gave up.
While searching, I found astro-community/codecs, which features a JXL codec! Maybe that’s what I needed? Well, for starters, please add an examples page to your github repo. Perhaps I’m just a bit dumb, but I can never get around how something works without some examples. Well, I tried and… Everytime I got a new error? Sometimes it was a "We can't parse a JXL file", which I thought the integration took care? but then it couldn’t ever find the files on my src/media folder! Why?? It’s there!! Just trust me!!
And thus there’s 15 commits named “Trying to fix JXL”, while all I wanted was to have a cute setup image list on my about me page!
Well, I’ll be converting the images to PNG, and pretty much all of them on the near future (storage is pretty much free!). But just know I spent hours of my life in this and I hope there’s an agreement on images format soon (and it’s not in favor of WebP/AVIF).