News for hackers. Stuff that matters.
Re:First automatic JPEG-XL cloud service by charcircuit on Wednesday September 20, 2023 @02:19AM (#37580972)
For other platforms it should check to see if it's more efficient to serve a JPEGXL WASM polyfill
Re:First automatic JPEG-XL cloud service by Scaevolus on Wednesday September 20, 2023 @03:32AM (#37581441)
Writing a good polyfill for this is harder than you might think, because the browser by default does lazy decoding of JPEG images to avoid holding too many buffers in RAM. Naive attempts (niutech/jxl.js) at JXL polyfills tend to crash browser tabs by using too much memory if they contain a few dozen megapixels of images, while Chrome normally can handle hundreds of megapixels of JPEGs on a page without difficulty.
Re:First automatic JPEG-XL cloud service by youngtaff on Wednesday September 20, 2023 @04:50AM (#37581959)
Relying on a polyfill means the browsers preloader won’t fetch the image early

Can add an explicit preload hint but it’s additional complexity