| ▲ | jakkos 6 hours ago |
| I've been hearing about fights over JpegXL and WebP (and AVIF?) for years, but don't know much about it. From a quick look at various "benchmarks" JpegXL seems just be flat out better than WebP in both compression speed and size, why has there been such reluctance from Chromium to adopt it? Are there WebP benefits I'm missing? My only experience with WebP has been downloading what is nominally a `.png` file but then being told "WebP is not supported" by some software when I try to open it. |
|
| ▲ | 3OCSzk a few seconds ago | parent | next [-] |
| 1 black pixel of .webp is smaller than 1 black pixel of .jpegxl that is also smaller than 1 black pixel of .png so webp > jpegxl > png |
|
| ▲ | jmillikin 5 hours ago | parent | prev | next [-] |
| Most of the code in WebP and AVIF is shared with VP8/AV1, which means if your browser supports contemporary video codecs then it also gets pretty good lossy image codecs for free. JPEG-XL is a separate codebase, so it's far more effort to implement and merely providing better compression might not be worth it absent other considerations. The continued widespread use of JPEG is evidence that many web publishers don't care that much about squeezing out a few bytes. Also from a security perspective the reference implementation of JPEG-XL isn't great. It's over a hundred kLoC of C++, and given the public support for memory safety by both Google and Mozilla it would be extremely embarrassing if a security vulnerability in libjxl lead to a zero-click zero-day in either Chrome or Firefox. The timing is probably a sign that Chrome considers the Rust implementation of JPEG-XL to be mature enough (or at least heading in that direction) to start kicking the tires. |
| |
| ▲ | latexr 4 hours ago | parent [-] | | > The continued widespread use of JPEG is evidence that many web publishers don't care that much about squeezing out a few bytes. I agree with the second part (useless hero images at the top of every post demonstrate it), but not necessarily the first. JPEG is supported pretty much everywhere images are, and it’s the de facto default format for pictures. Most people won’t even know what format they’re using, let alone that they could compress it or use another one. In the words of Hank Hill: > Do I look like I know what a JPEG is? I just want a picture of a god dang hot dog. https://www.youtube.com/watch?v=EvKTOHVGNbg | | |
| ▲ | jmillikin 4 hours ago | parent [-] | | I'm not (only) talking about the general population, but major sites. As a quick sanity check, the following sites are serving images with the `image/jpeg` content type: * CNN (cnn.com): News-related photos on their front page * Reddit (www.reddit.com): User-provided images uploaded to their internal image hosting * Amazon (amazon.com): Product categories on the front page (product images are in WebP) I wouldn't expect to see a lot of WebP on personal homepages or old-style forums, but if bandwidth costs were a meaningful budget line item then I would expect to see ~100% adoption of WebP or AVIF for any image that gets recompressed by a publishing pipeline. | | |
| ▲ | ascorbic an hour ago | parent | next [-] | | Any site that uses a frontend framework or CMS will probably serve WebP at the very least. | |
| ▲ | vlovich123 2 hours ago | parent | prev [-] | | It’s subsidized by cheap CDN rates and dominated by video demand. |
|
|
|
|
| ▲ | jacobp100 6 hours ago | parent | prev | next [-] |
| JpegXL and AVIF are comparable formats. Google argued you only needed one, and each additional format is a security vulnerability. |
| |
| ▲ | londons_explore 3 hours ago | parent [-] | | And more importantly, an additional format is a commitment to maintain support forever, not only for you, but for future people who implement a web browser. I can completely see why the default answer to "should we add x" should be no unless there is a really good reason. |
|
|
| ▲ | coppsilgold 5 hours ago | parent | prev | next [-] |
| JPEG XL has progressive decoding https://www.youtube.com/watch?v=UphN1_7nP8U |
|
| ▲ | out_of_protocol 5 hours ago | parent | prev | next [-] |
| - avif is better at low bpp (low-quality images), terrible in lossless - jxl is better at high bpp, best in lossless mode |
|
| ▲ | rdsubhas 3 hours ago | parent | prev | next [-] |
| > various "benchmarks" JpegXL seems just be flat out better than WebP The decode speed benchmarks are misleading. WebP has been hardware accelerated since 2013 in Android and 2020 in Apple devices. Due to existing hardware capabilities, real users will _always_ experience better performance and battery life with webp. JXL is more about future-proofing. Bit depth, Wide gamut HDR, Progressive decoding, Animation, Transparency, etc. JXL does flat out beats AVIF (the image codec, not videos) today. AVIF also pretty much doesn't have hardware decoding in modern phones yet. It makes sense to invest NOW in JXL than on AVIF. For what people use today - unfortunately there is no significant case to beat WebP with the existing momentum. The size vs perceptive quality tradeoffs are not significantly different. For users, things will get worse (worser decode speeds & battery life due to lack of hardware decode) before it gets better. That can take many years – because hey, more features in JXL also means translating that to hardware die space will take more time. Just the software side of things is only now picking up. But for what we all need – it's really necessary to start the JXL journey now. |
|
| ▲ | speps 6 hours ago | parent | prev | next [-] |
| It was an issue with the main JPEGXL library being unmaintained and possibly open for security flaws. Some people got together and wrote a new one in Rust which then became an acceptable choice for a secure browser. |
| |
| ▲ | a-french-anon 5 hours ago | parent [-] | | Unmaintained? You must be mistaken, libjxl was getting a healthy stream of commits. The issue was the use of C++ instead of Rust or WUFFS (that Chromium uses for a lot of formats). |
|
|
| ▲ | archerx 5 hours ago | parent | prev [-] |
| Google created webp and that is why they are giving it unjustified preferential treatment and has been trying to unreasonably force it down the throat of the internet. |
| |
| ▲ | adzm 3 hours ago | parent | next [-] | | WebP gave me alpha transparency with lossy images, which came in handy at the time. It was also not bogged down by patents and licensing. Plus like others said, if you support vp8 video, you pretty much already have a webp codec, same with AV1 and avif | | |
| ▲ | archerx 2 hours ago | parent [-] | | Lossy PNGs exist with transparency. | | |
| ▲ | adzm an hour ago | parent [-] | | Do you mean lossless? PNGs are not lossy. A large photo with alpha channel in a lossless png could easily be 20x the size of a lossy webp |
|
| |
| ▲ | breppp 3 hours ago | parent | prev | next [-] | | unjustified preferential treatment over jpegxl a format google also had created | | |
| ▲ | archerx 3 hours ago | parent [-] | | They helped create jpegXL but they are not the sole owner like they are with webp. There is a difference. | | |
| ▲ | breppp 3 hours ago | parent [-] | | a better argument might be that chrome protects their own vs a research group in google switzerland, however as other mentioned the security implications of another unsafe binary parser in a browser is hardly worth it | | |
|
| |
| ▲ | MrDOS 2 hours ago | parent | prev [-] | | You're getting downvoted, but you're not wrong. If anyone else had come up with it, it would have been ignored completely. I don't think it's as bad as some people make it out to be, but it's not really that compelling for end users, either. As other folks in the thread have pointed out, WebP is basically the static image format that you get “for free” when you've already got a VP8 video decoder. The funny thing is all the places where Google's own ecosystem has ignored WebP. E.g., the golang stdlib has a WebP decoder, but all of the encoders you'll find are CGo bindings to libwebp. | | |
| ▲ | archerx 2 hours ago | parent [-] | | I noticed Hacker news is more about feelings than facts lately which is a shame. |
|
|