5 ms·
All of the people here who are so passionate about JPEG-XL will be happy to learn that there's nothing preventing them from using it on their sites right now:
by CharlesW 4y ago
All of the people here who are so passionate about JPEG-XL will be happy to learn that there's nothing preventing them from using it on their sites right now:
https://github.com/niutech/jxl.js https://github.com/niutech/jxl.js
If you want Chrome to ship with JPEG-XL support, use it. At some point, browser makers will decide it's worth the incremental cost (to them and all users) to add it.
- zamadatix 4y agoA bundling approach works great for web apps (e.g. an online image editor) but for serving images you have to be willing to not only lose any of the size and speed benefits but to completely demolish your website's performance all in hopes one day enough sites agree to do the same.
- CharlesW 4y agoIf the advantages of JPEG-XL are not worth websites downloading ~300KB (the size of 1 or 2 "hero" images) to users, one could argue that browser makers shouldn't add it to every download of their browser in perpetuity.
- zamadatix 4y agoTo be clear I'm not a fan of adding JPEG-XL to browsers rather I think you're presenting a strawman for why. Even if the size overhead were 0 bytes you're still completely ignoring the project page says it takes ~0.8 seconds (~0.5 multithreaded) to load 0.2 kilobyte image files with nothing else going on. An infinitely better format wouldn't make sense to a lot of sites. That is to say people excited about JPEG-XL being removed aren't simply just ignorant they could decode it via JavaScript/WASM. Mostly they seem to disagree on what "enough improvement" to outweigh the cost of a shipping a new format is. E.g. Cloudinary is a commonly referenced proponent not by chance but because they operate a media CDN and it makes sense for them to present lots of material about the advantages vs say a single site.
- CharlesW 4y ago> To be clear I'm not a fan of adding JPEG-XL to browsers rather I think you're presenting a strawman for why. I'm trying to make a good faith argument that if even passionate fans of the format are not willing to bear the time and bandwidth equivalent of loading a small number of images to use the format, that's a strong signal that it's not worth it.
- edflsafoiewq 4y agoThere is indeed nothing in JPEG-XL worth breaking the entire image ecosystem for, where the image can used in a normal <img> tag, where you can direct link to the image URL, where you can save the image, where you can upload the image to any site you want, where you can see the thumbnail in your file browser, where you can open it in any image editor, etc. There is probably never going to be an image format that would be worth throwing all that away for a JS shim that dumps pixels into a <canvas>. But that doesn't mean it is never worth adopting a new format into the image ecosystem.
- zamadatix 4y agoThe jxl.js approach actually allows for some of that. Particularly putting <img src="https://jpegxl.info/logo.jxl https://jpegxl.info/logo.jxl"> works like normal (no <canvas>) as jxl.js functions using a mutation observer for such tags which then transcodes the image to a supported format (such as png) and caches it. Similarly you can then save the image in a way you'll have thumbnail support, image editor support, etc - all of course with the downside it'll be e.g. png at that point not the original. One thing that is straight broken is direct linking. Since the transcoding is local the generated cached link is only local relevant. Similarly, since it has to not only spin up a decoder but transcode the image it is impractically slow.
- zamadatix 4y agoPassionate fans of an image format loading small numbers of images via shim isn't what makes browser makers change their minds. And clearly such fans do already exist or the github project wouldn't. The problem in this measure is it is impossible to pass regardless the format. How can a test be a strong signal of anything if everything would fail it? If this were a few millisecond/few byte component like a JavaScript feature extension I would see the applicability but image formats are too large and too slow to reasonably expect meaningful adoption via shims.