Then why haven't everyone switched to webp from png/jpeg which gave >25% gain over jpeg and supported by chrome from 12 years? For better or worse, no one wants to sacrifice compatibility for 20% gain.
Because WebP does not offer a >25% improvement. As far as I know, it is only better than JPEG in some cases, and then seldom by that much. [1] And of course, this is only when you compress an image lossily. If you try to recompress an already-lossy JPEG as a WebP, it will suffer even more quality loss in the process. (And if you try to recompress it losslessly, the resulting WebP will be bigger.)
JPEG XL lets you recompress an existing lossy JPEG losslessly, saving you 20% in the process. This is something that other formats like WebP or AVIF do not and can not offer.
Even the site you pointed to show average 18% decrease in size compared to best but slow jpeg encoder.
"JPEG XL lets you recompress an existing lossy JPEG losslessly” This is such a niche usecase. Who cares about bit more lossy compression for an already lossy compressed file.
Are we looking at the same graphs? In the linked comparison, WebP has at best maybe 10% of an improvement over JPEG for a 500px image, and actually performs worse as the images get bigger. (The 18% you’ve likely read are in comparison to the cjpeg, not mozjpeg, which compresses better.)
There’s also no reason one should tolerate further loss just because the image is already lossy. Whether the original is lossy or not, you either want to keep it exactly the same, or you're okay losing quality to save some space. Archiving and preservation come to mind as the first reason someone would want to go with the former.
> Who cares about bit more lossy compression for an already lossy compressed file.
Perhaps for those unaware: "without quality loss". I guess the people who care are those who store a lot of images in jpeg format (at least relative to the storage space they have). In my example, I have >1TiB of photos in JPG format (yes, I know), and it would be nice to get 200GiB back for free without losing quality. For a company offering an image storage product, this would be great cost reductions.
I don't think it's a niche use case. The amount of existing JPEG files is huge. Having a way to compress them better without having to worry about introducing additional loss, is a "nobrainer" type of improvement.
I guess you have a misunderstanding here, it's a lossless compression of an already lossily compressed file (which had used suboptimal coding methods). You will get a bit-perfect original JPEG file when you decompress a recompressed JPEG XL file. No additional compression artifact there.
JPEG XL lets you recompress an existing lossy JPEG losslessly, saving you 20% in the process. This is something that other formats like WebP or AVIF do not and can not offer.
[1]: https://siipo.la/blog/is-webp-really-better-than-jpeg