36 comments

  • yhjc26923 hours ago
    &gt; <i>libjxl&#x27;s maximum effort is very slow. It produces files 2–7% smaller than its default for photos, and ~25% smaller for the screenshot and illustration, but takes 9–46 seconds, which is 50–180x as long as its default. jixel gets the same results in a couple of seconds.</i><p>libjxl&#x27;s slow speed at efforts &gt;7 is primarily due to an iterative evaluation-optimization loop of a perceptual error metric called Butteraugli (by tuning quantization weights). This, as well as some other computations in libjxl encoding, happen to be data-parallel and run faster on GPUs than multicore CPUs.<p>In case anyone is interested, I&#x27;ve been working on a GPU-accelerated libjxl port (supporting CUDA and Metal for now) that makes this much faster, closer to libjxl&#x27;s normal speeds: <a href="https:&#x2F;&#x2F;github.com&#x2F;yunho-c&#x2F;gjxl" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;yunho-c&#x2F;gjxl</a> - geared for encoding a large batch images into JPEG XL. It&#x27;s also faster by around 2.9x at normal effort (7).
  • linolevan1 hour ago
    I think people are really forgetting that JXL&#x27;s encoders are bad right now. For instance, in TFA Jake presents<p>- The Firefox screenshot w&#x2F; lossless JXL at 66.9kB, when with a better encoder you get get it down to like 40.7kB (39% smaller) [1] (or 43kB if you need it to work with jxl-rs [2])<p>- The cat illustration w&#x2F; lossless JXL at 255.3kB, when with a better encoder you can get it down to 178kB (30% smaller) [3]<p>[1] <a href="https:&#x2F;&#x2F;www.linolevan.com&#x2F;05-screenshot.jxl" rel="nofollow">https:&#x2F;&#x2F;www.linolevan.com&#x2F;05-screenshot.jxl</a><p>[2] <a href="https:&#x2F;&#x2F;www.linolevan.com&#x2F;05-screenshot-web.jxl" rel="nofollow">https:&#x2F;&#x2F;www.linolevan.com&#x2F;05-screenshot-web.jxl</a><p>[3] <a href="https:&#x2F;&#x2F;www.linolevan.com&#x2F;06-illustration.jxl" rel="nofollow">https:&#x2F;&#x2F;www.linolevan.com&#x2F;06-illustration.jxl</a>
    • Aachen1 hour ago
      Oh, that explains! I tried AVIF and JXL a few years ago and one of the two took ages to encode (a minute versus &lt;1s for jpeg) to get similar compression ratios, and the other was somewhat reasonable on cpu complexity but significantly worse quality at the same size &#x2F; much bigger to achieve the same quality as good old jpeg. I ended up concluding that jpeg is still the best for the specific image I was trying to lossily compress, but that was probably just the encoder then
    • jaffathecake44 minutes ago
      Happy to see your version of the cat illustration doesn&#x27;t come with massive decoder overhead. Are you planning to open source this encoder?
      • linolevan41 minutes ago
        It&#x27;s just a side project I&#x27;m working on with some friends. May release it if it&#x27;s interesting to folks.
        • 14976515 minutes ago
          I would love to try it out.
          • linolevan3 minutes ago
            I&#x27;ll post it to bsky&#x2F;HN at some point in the future!
    • ksec56 minutes ago
      Thank You. I was about to post I suspect both of those images would have worked better with JXL lossless.<p>Curious what is the better encoder here referring to?
      • jaffathecake42 minutes ago
        It&#x27;s an unreleased one. There&#x27;s a whole section in the article about lossless, which includes data on those images, but not this mystery unreleased encoder <a href="https:&#x2F;&#x2F;jakearchibald.com&#x2F;2026&#x2F;jpeg-xl-vs-avif&#x2F;#lossless" rel="nofollow">https:&#x2F;&#x2F;jakearchibald.com&#x2F;2026&#x2F;jpeg-xl-vs-avif&#x2F;#lossless</a>
    • yhjc26921 hour ago
      Yeah, it&#x27;s very cool that jixel was able to achieve such large efficiency improvements!
  • Metricon3 hours ago
    AVIF is fantastic format and I use it in my production applications. Spent quite a bit of time looking to the best settings (at least for up to 2k images) and for anyone interested in converting images to AVIF, here&#x27;s what I&#x27;ve found to work the best for creating the smallest size (10x+ smaller) while still retaining good quality and even supports PNG transparency:<p><pre><code> ffmpeg -i {input_file} -filter_complex &quot;[0:v]format=pix_fmts=yuva444p,split[color][alpha];[alpha]alphaextract[alpha_chan]&quot; -map &quot;[color]&quot; -map &quot;[alpha_chan]&quot; -c:v libaom-av1 -crf 25 -cpu-used 3 -still-picture 1 -aom-params &quot;sharpness=2:enable-chroma-deltaq=1:arnr-strength=0&quot; -color_range pc -colorspace bt709 -color_primaries bt709 -color_trc bt709 {output_file}</code></pre>
    • jaffathecake3 hours ago
      Hmm, I haven&#x27;t tested this, but I&#x27;m deeply sceptical. avifenc is now optimised very well for still images, and you&#x27;re bypassing all of that here.
      • Metricon2 hours ago
        These settings have worked very well for me so far, but if you are aware of even better settings, I&#x27;d certain like to give it a try.
        • jaffathecake2 hours ago
          avifenc. The latest version.
          • Metricon2 hours ago
            Ah, I actually wasn&#x27;t aware that &quot;avifenc&quot; was a separate executable. Thanks for the information. I will definitely do some comparison testing.
            • theandrewbailey2 hours ago
              It&#x27;s part of libavif. I&#x27;ve usually compiled it myself.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;aomediacodec&#x2F;libavif" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;aomediacodec&#x2F;libavif</a><p>avifenc supports args like enable-chroma-deltaq. I&#x27;ve used those but recently stopped, and nothing substantial changed.
    • LewisOrton1 hour ago
      in my app i was using jpeg but then switched to webp two years ago, they&#x27;re for generating&#x2F;displaying thumbnails for images and videos. and now avif seems like a better fit? anything that you&#x27;re not happy about? considering avif now, appreciate any ideas
  • CodesInChaos29 minutes ago
    <a href="https:&#x2F;&#x2F;jakearchibald.com&#x2F;2026&#x2F;jpeg-xl-vs-avif&#x2F;#lossy---screenshot" rel="nofollow">https:&#x2F;&#x2F;jakearchibald.com&#x2F;2026&#x2F;jpeg-xl-vs-avif&#x2F;#lossy---scre...</a><p>In full screen mode, the &quot;hold for lossless&quot; version &quot;Firefox help&quot;&#x2F;&quot;Submit feedback&quot; are not underlined. In inline mode they are. Both modes seem to render a scaled down version of the image, which seems to cause these problems.
  • PaulHoule4 hours ago
    That F1 image is, in my mind, proof of exactly what is wrong with AVIF. If you look closely the beautiful highlights on the car have been erased and replaced with something plausible. Once you see it you can&#x27;t unsee it and it boggles my mind that people are still using it as an example.<p>Granted, AVIF performs impressively for, say, a huge hero image for a blog where you&#x27;re out to create an overall impression and people aren&#x27;t going to look at it closely. It does not impress me when I am compressing photos I took with my mirrorless and I expect them to look like photos taken with a mirrorless and not cell phone snaps.
    • boogerlad4 hours ago
      Would you be able to circle these highlights? I viewed - <a href="https:&#x2F;&#x2F;jakearchibald.com&#x2F;c&#x2F;original-CXtAofvc.jpg" rel="nofollow">https:&#x2F;&#x2F;jakearchibald.com&#x2F;c&#x2F;original-CXtAofvc.jpg</a> - <a href="https:&#x2F;&#x2F;jakearchibald.com&#x2F;c&#x2F;avif-q39-e0-d8-yuv444-ssimu70.4-Dra_ZljE.avif" rel="nofollow">https:&#x2F;&#x2F;jakearchibald.com&#x2F;c&#x2F;avif-q39-e0-d8-yuv444-ssimu70.4-...</a> at 100% magnification at peeped around for a few minutes but didn&#x27;t notice anything. Maybe my eyes &#x2F; monitor is bad...
      • PaulHoule4 hours ago
        Oh crap, it&#x27;s this image<p><a href="https:&#x2F;&#x2F;jakearchibald.com&#x2F;2020&#x2F;avif-has-landed&#x2F;demos&#x2F;compare&#x2F;?show=f1" rel="nofollow">https:&#x2F;&#x2F;jakearchibald.com&#x2F;2020&#x2F;avif-has-landed&#x2F;demos&#x2F;compare...</a><p>I was talking about. He linked another one! Guess people finally realized <i>that</i> one sucks and now they have a new one. I screwed up.
        • jaffathecake3 hours ago
          They didn&#x27;t even have the halo back then!
    • dfabulich4 hours ago
      I&#x27;m looking as closely as I&#x27;m able, and I don&#x27;t see what you mean. (I&#x27;m not a car guy, or a photo guy.) What do you mean by highlights? What am I looking for? Reflections?
      • buzer4 hours ago
        Look between the Eni and ApeCoin logos. In lossless you can see there are lines from what I assume separate pieces assembled together. Next to ApeCoin there&#x27;s also a round piece in the lossless version which is missing from the AVIF. JPEG XL loses most of these as well though.<p>That&#x27;s what I noticed anyway, not a car or photo guy either.
        • jaffathecake3 hours ago
          The original is a single photo.
          • buzer2 hours ago
            If you are referring to &quot;lines from what I assume separate pieces assembled together.&quot; I didn&#x27;t mean that the photo was assembled from multiple pieces, I meant that part of car was (panels or similar). Those lines between panels were no longer visible.
      • jaffathecake4 hours ago
        I agree fwiw. The only one that looks bad to me is jixel at lower qualities.
    • jaffathecake4 hours ago
      OH WAIT. I KNOW WHAT&#x27;S HAPPENING HERE.<p>You&#x27;re looking at it in a browser that doesn&#x27;t support JPEG XL, so it&#x27;s falling back to a WASM renderer, and I think it handles resizing differently.<p>This is totally my bad. I thought I was doing a good thing by adding that fallback renderer, but it isn&#x27;t identical and it&#x27;s giving people the wrong impression.<p>The lossless version is JPEG XL, hence the difference to AVIF.
      • mkesper9 minutes ago
        I also feel like sometimes the lossless image &#x27;sticks&#x27; even after having released the button. Don&#x27;t know how to reliably test that, though.
      • CodesInChaos50 minutes ago
        In Firefox 157.0.1, the right border of the image moves by a pixel or two when I press &quot;hold for lossless&quot; while viewing the AVIF. I think it&#x27;s the lossy AVIF that&#x27;s a bit too small.
        • jaffathecake22 minutes ago
          That&#x27;s what I&#x27;m talking about. JXL support landed in 158.
          • CodesInChaos11 minutes ago
            But why does missing JXL support make the AVIF too small? It ends one pixel before the gray background.
      • eviks3 hours ago
        by the way, why not convert everything to png for comparisons to avoid browser support issues?
        • jaffathecake2 hours ago
          All browsers support AVIF and JPEG XL now. I was hoping to keep their download size benefits.
          • D2OQZG8l5BI1S062 hours ago
            Firefox added support only 3 days ago! And this doesn&#x27;t cover the ESR version.
            • jaffathecake41 minutes ago
              Sure but this is a technical post aimed at a technical audience.
  • ezst2 hours ago
    Having lived through the MP3 era and experienced the many years&#x2F;decades? that it took for experts across fields to come together and figure out LAME and the bag of parameters that ultimately made it better than most audio formats around it, I would lean towards waiting this one out, and not take any announcement of a &quot;winner&quot; as gospel. We&#x27;ve yet to see the codecs mature and refine for some time.<p>I also remember the big claims about WebP&#x27;s superiority, which ended-up in practice, at equivalent file-size, mostly trading away some of the JPEG artifacts that we all know for some unusual new ones.<p>I don&#x27;t think there&#x27;s a large-enough margin in this space that a new format could chew into to make the general public care: image compression seems like a solved problem overall. The second best thing is to come-up with a format that can make the content producers not have to care either, i.e. be the best in class or close-enough in a variety of use-cases (lossy, lossless, fast, animated, hdr, progressive, …). My naive impression was that jxl is mostly interesting in that regard.
    • Aachen50 minutes ago
      &gt; I don&#x27;t think there&#x27;s a large-enough margin in this space that a new format could chew into to make the general public care<p>What improvement do you think is necessary for people to care?<p>Genuinely curious. Spoiler link with my answer to avoid any bias: <a href="https:&#x2F;&#x2F;lgms.nl&#x2F;p&#x2F;cau&#x2F;?b64&amp;ZVRNb9QwEL0j9T%2BMKqFtpe1Cqcq9qoTUAwIJLhwn8SRxN%2FFEtrPB%2FHreOFso4tCN5c7Hm%2Ffe%2BIkkPGshXpxXalSPiTg4WgcJNBUafRM5Fmp1GR2lIfpwpDT6fshjoUZaXpLQw8Pju2%2BzyE%2FiKLjNWSLlgQN9%2Fnpnh4wfOZdveRLyYU9PtNaqz0vKFOVGQqtOKMj6CkjL40g%2BU6%2FqDvTdSq2cgFqXfqBOI6FaVmRFd7MdU%2BaYaUk%2B9Mi8eHPx5su8JGpGFK5YdMFfVyGtvEG1agd6yjTweJJU%2F5f8L7G4VzQYoidgCjtECsca53zXSQR6GwttPIKSd3LTlBv7UpaU056mpR1olJQ2diOK6QQWqwIG9oWjfe1TofrQjosDoKQYLnEnudDEsUcnjMon9efIc8A0owM5JScnGXXGt5M2JwqafSsMFs7tZR65yAaVmlK%2FoGB3EuI2e2SXv6o4QrlY8mA4jXWc0jZRzz4YyY86zRw8upsJeEyA53TOlmEC7EkO%2FYF%2BgP2lkTqiYuKYNvybF%2BrN6uGp6oo0C8ImRcFJgxRSEIzM1bsMvR4qTbjmMQq7AtGBFG4EG5B%2BV6cmpg4DGeYVt9Mc9SSThGwjhQN9ghDHscCPO0f9YvpUQO2feTZorY1lozPd3r%2F9p9CV72onE%2Fca6tmJ02Z6wD4XnLkYz3Y5S%2BamZDFHQ4ukXV6tfBBxqXp4mWeFi70JW2fcYQ8mPkLjBYG4dyqp9loHDxlm9aF2jFLnhnacQJchbjWkZapU60aJCYMir7ByXbxesEicPRIrZmtiZj8GXV8W25RDTgyJLv%2Fvhw5mFZOCpvkO0aXqB4qKLihYd4fhshnu%2BvD%2B9p6qEWO6pKsq5mSvC5phF2KwlULQx%2FNK2PNjwHb2OhA64mkaFMa%2BrgEvcHux1alUD9z4uu5nVC%2BLppAU3Eyc028%3D" rel="nofollow">https:&#x2F;&#x2F;lgms.nl&#x2F;p&#x2F;cau&#x2F;?b64&amp;ZVRNb9QwEL0j9T%2BMKqFtpe1Cqcq9qoT...</a>
    • tormeh1 hour ago
      Another interesting niche is in between JPEG and RAW. RAW files are a pain to deal with, but editing JPEGs can be problematic due to bit depth and whatnot. Personally I just want to shoot pictures and not edit&#x2F;convert&#x2F;whatever, but sometimes I have a shot that could benefit from a bit of adjustment, and that&#x27;s where even large JPEGs have an issue. Bit depth and whatever isn&#x27;t suitable.
  • theandrewbailey3 hours ago
    I&#x27;ve been using AVIF on my blog for a few years. My blog&#x27;s image corpus is almost entirely videogame screenshots, and I keep the original PNGs so I can re-encode if better encoders release. Despite playing around with JPEGXL every year or so, AVIF images usually looked better (if only a little) at the same file size (vs JPEGXL).<p>After reading this article, there&#x27;s something to point to prove I&#x27;m not going crazy.
  • bitpush4 hours ago
    I&#x27;m only casually following JPEG-XL and my impression from previous reading here on HN was that JPEG-XL was the best solution available for a wide variety of usecases, but it looks like numbers dont match that claim?
    • mdasen44 minutes ago
      I think many people disliked Google&#x27;s control of Chrome blocking JPEG XL rather than it being able to compete on its merits.<p>JPEG XL also has some big benefits for many use cases like lossless re-encoding and supporting higher resolution. AVIF images have a max size of 8192x4352 last I checked. That&#x27;s not a problem for web images almost all of the time, but there&#x27;s certainly uses where you might want more. I think AFIV might be limited to 12bit overall while JPEG XL can do 32bit. Again, is that something many will take advantage of on the web? No, but if it&#x27;s something you care about it might be really meaningful to you.<p>Also, if you care about the 90% quality level, JPEG XL often outshines AVIF, but when I&#x27;m putting images on the web it&#x27;s often well below that.<p>Some of it was bad information. I saw some people saying JPEG XL being way less computationally intensive (even less than WebP) and offering much better compression. Some of it was selective data - do you only test things at 95% quality level and declare a winner?<p>But I think the big thing is that a lot of people wanted the two formats to succeed or fail based on their merits. I think a lot of people don&#x27;t like AVIF because it isn&#x27;t well supported outside of browsers - and there can be a hope that the JPEG name would mean JPEG XL would get the kind of adoption JPEG did.<p>And it&#x27;s hard to truly compare formats - or benchmark in general. As the article shows, different JPEG XL encoders offer vastly different performance. And when we&#x27;re dealing with lossy compression, sometimes it can be a bit of personal preference. At some point, people started enjoying the way that MP3 garbled symbols (the instrument) and that was the sound they expected a symbol to make.
      • jaffathecake37 minutes ago
        &gt; AVIF images have a max size of 8192x4352<p>This isn&#x27;t true btw. The format supports up to 64k x 64k, although browser decoders currently fail beyond 16k x 16k.<p>Not sure when you&#x27;d serve something like that on a web page though.
    • adrian_b3 hours ago
      JPEG-XL is not the best solution if you want small low-quality images, to reduce your costs for hosting some Web site. AVIF seems appropriate for that goal.<p>JPEG-XL seems to be the best solution for storing and distributing high-quality images. For myself, I want high-quality images, so JPEG-XL is what matters, both for new images and for compressing the old archives of JPEG images.<p>While I have my own Web server, it is for private use and not for commercial purposes, so I have no interest in using AVIF to achieve the smallest image sizes, but at a lower quality than I want.
      • jaffathecake2 hours ago
        Please read the article. All of the comparisons default to &quot;high&quot; quality, according to JXL&#x27;s own metric.
        • adrian_b2 hours ago
          Most of the comparisons are not about what I would call &quot;high quality&quot; images.<p>And the article supports what I have said.<p>Quotation from the article:<p>&gt; But JPEG XL catches up at very high quality. Around SSIMULACRA2 85, libjxl&#x27;s default matches AVIF&#x27;s default, and at maximum efforts, jixel &#x27;extraslow&#x27; is ~6% smaller than AVIF s0. jixel &#x27;slow&#x27; is 10–13% smaller than AVIF&#x27;s default from SSIMULACRA2 80 upwards.
          • JyrkiAlakuijala48 minutes ago
            I believe that:<p>ssimulacra2 85 is rather close to median quality in the internet<p>ssimulacra2 90-95 is rather close to high quality in the internet<p>ssimulacra2 98+ is close to camera quality
          • jaffathecake36 minutes ago
            &#x27;high quality&#x27; and &#x27;very high quality&#x27; are different things.
    • kps2 hours ago
      &gt; for a wide variety of usecases<p>For a wide variety of usecases, not for every isolated usecase. Today, AVIF is better for showing people ads^W^W^W web content delivery. This article is titled “JPEG XL vs. AVIF for web use-cases”. The other article recently discussed¹ is subtitled “Investigating JPEG XL&#x27;s place as a Web image codec” and ends:<p>&gt; JPEG XL isn&#x27;t useless; it is genuinely compelling technology for use cases beyond the Web.<p>¹ <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=49690554">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=49690554</a><p>(Either way, can we agree to take webp out behind the barn?)
    • throw0101c4 hours ago
      JPEG-XL can be a quick win since it is possible to do a transcode of all of your existing (&#x27;classic&#x27;) JPEG files with zero (visual) losses in quality.
      • venusenvy471 hour ago
        I always think of transcode and lossless as opposites. How is this achieved in this format?
        • ksec1 hour ago
          It extracts the already quantized DCT coefficients and related data from the JPEG bitstream and re-encodes them with JPEG XL’s more efficient entropy coding and container,<p>Think of it as zip compression that is specially designed for JPEG and putting the JPEG data in a different&#x2F;better container.
      • bitpush3 hours ago
        If you&#x27;re transcoding why wont you go to avif or another one? If jpeg -&gt; jpeg-xl uniquely better?
        • pwg3 hours ago
          JPEG is a lossy format. JPEG -&gt; AVIF adds a second loss operation. JPEG to JPEG-XL is lossless but with a smaller file size. So one does not further degrade the jpegs beyond what they were already degraded in creating them in the first place.
    • ksec1 hour ago
      AVIF ( or even AV1 itself ) has had massive increase in quality improvements over the past 6 years. JPEG XL was close to release in 2020 and finalised in 2021. A lot of the sentiments hold true back then.<p>JPEG XL has always been targeting high quality encoding metric first before the lower end low BPP images, which AV1 excels at with or without the last 6 years of improvements.<p>The current top comments about MP3 and LAME is again about how encoder extract maximum potential. JPEG XL was may be the best in 2021, but has been fighting for survival since then.<p>There a lot of different images that JPEG XL encode better. Screenshots with text is known to be not something they have optimised for or think it could be good at. Lossless mode may be better. Edit: As one of the other comment here proved my point.<p>Had all of these, even just a hint of AVIF improvement be told, may be the sentiments would have been a little different. But then again I am not one who would trust the same people who sold me WebP and AOM roadmaps.<p>But at least AV2 is coming. And JPEG XL is finally in every browser. Hopefully we can all have something even better in the future.
    • jaffathecake4 hours ago
      Claims around JPEG XL have always been wild. E.g. this from one of the creators <a href="https:&#x2F;&#x2F;x.com&#x2F;jyzg&#x2F;status&#x2F;1592811472073416704" rel="nofollow">https:&#x2F;&#x2F;x.com&#x2F;jyzg&#x2F;status&#x2F;1592811472073416704</a>
      • bitpush3 hours ago
        That&#x27;s.. horrific. How can someone be this out of touch?
  • eviks3 hours ago
    Unfortunately for the comparison-focused blog post the comparison widgets is pretty bad - you can&#x27;t quickly compare 2 reference pictures (original vs AVIF or original vs JXL) at different scalings like here <a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20200915201019&#x2F;https:&#x2F;&#x2F;afontenot.github.io&#x2F;image-formats-comparison&#x2F;#abandoned-factory&amp;avif=s&amp;avif=s" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20200915201019&#x2F;https:&#x2F;&#x2F;afontenot...</a><p>(also like the BPP size metric that is picture size-independent)<p>Wish that widget with improvements (that allows comparison of 3 pics with 3 buttons: original&#x2F;codec1&#x2F;codec2) were the widespread standard (also, &quot;hold&quot; is a rather unergonomic action)<p>Otherwise, seems like AVIF has had impressive gains in both speed and quality, wonder whether JXL could catch up
    • networked2 hours ago
      For a moment I was sad the original comparison page was gone. It turns out it is still online under the developer&#x27;s new GitHub username: <a href="https:&#x2F;&#x2F;lmfont.github.io&#x2F;image-formats-comparison&#x2F;#abandoned-factory&amp;avif=s&amp;avif=s" rel="nofollow">https:&#x2F;&#x2F;lmfont.github.io&#x2F;image-formats-comparison&#x2F;#abandoned...</a>.
      • eviks1 hour ago
        Thanks! Was also sad, but it&#x27;s &quot;just&quot; linkrot, will update bookmarks
    • jaffathecake3 hours ago
      Offering different scalings is pointless because they&#x27;re designed for a single largest size.
      • eviks1 hour ago
        But they won&#x27;t be viewed at different sizes? But even then, the point is in making detection of artifacts easier
        • jaffathecake32 minutes ago
          As someone putting an image on a web page, why would I make detection of artifacts easier?<p>The images in the article max out at the maximum size I&#x27;d want them displayed.
  • fngjdflmdflg4 hours ago
    &gt;Animated image formats are dumb and animated JPEG XL is no exception. Video formats are better at video. They&#x27;re built for it. They&#x27;re optimised for it. Not just in terms of encoding, but also in terms of playback.<p>This is something I&#x27;ve felt doesn&#x27;t get enough attention when comparing JXL and AVIF. AVIF can be the replacement for GIF.<p>&gt;&lt;video muted autoplay&gt; is right there.<p>&gt;No, I&#x27;m not adding a demo. I don&#x27;t want it on my server. Use video formats for video.<p>I&#x27;m not sure if &quot;Use video formats for video&quot; is saying to use AVIF over JXL or saying to use AV1 over AVIF. If the latter, GIF-like animations have a different enough user expectation that it makes sense to have it as something different from regular videos. Even &lt;video muted autoplay&gt; doesn&#x27;t encode the full expected behavior because GIFs are not expected to have controls like pause, play and scrub. And even if you hide the controls users will expect similar behavior when opening it in an image viewer or in a new tab. Images do not have controls so they fit better as an image, although maybe they need their own category.<p>Also, I didn&#x27;t realize how good AVIF was at progressive rendering. I don&#x27;t think I knew it could do that at all. I think AVIF is the clear winner for the web, although it is still nice to have JXL for lossless. Somehow I feel that AVIF still hasn&#x27;t gained as much usage as it should, especially now that it is supported almost everywhere. I think I see more webp than AVIF, and JPEG is still everywhere. Maybe now that JXL is out, developers will take another look? AVIF is supported by 96.35%-98.83% of browsers according to caniuse whereas webp is 97.18%-99.68% and JPEG is 97.28%-99.78%.<p>I also didn&#x27;t know there was a Rust JXL encoder named jixel.[0]<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;awxkee&#x2F;jixel" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;awxkee&#x2F;jixel</a>
    • Dylan168073 hours ago
      I agree that animated images make sense as a category. But I wish I did get controls on them when opened directly. Being unable to pause a gif leads to very annoying workarounds sometimes.
    • eviks3 hours ago
      nit: another rust ENCoder, not DE<p>Though given the lagging speed in decoding, is there a faster tying JXL decoder planned?
      • jaffathecake2 hours ago
        jxl-rs is rust (used in Firefox and Chrome), and already faster than libjxl (used in Safari).
      • fngjdflmdflg2 hours ago
        Fixed that, thanks!
  • adzm4 hours ago
    JPEG transcoding is one of the neatest features of JXL; there is so much existing jpeg out there. Eventually that may be unnecessary, but it&#x27;s looking like this could already save a significant amount of space for photo archive backups for example.
    • lern_too_spel4 hours ago
      That&#x27;s just by changing the entropy coder and retaining the DCT coefficients. The idea is similar to Dropbox&#x27;s Lepton. <a href="https:&#x2F;&#x2F;dropbox.tech&#x2F;infrastructure&#x2F;lepton-image-compression-saving-22-losslessly-from-images-at-15mbs" rel="nofollow">https:&#x2F;&#x2F;dropbox.tech&#x2F;infrastructure&#x2F;lepton-image-compression...</a>
      • jeffbee4 hours ago
        The main difference being that Lepton is worse and 100x slower.
        • CodesInChaos46 minutes ago
          Lepton guarantees that JPEG-&gt;Lepton-&gt;JPEG produces an identical file, not just identical pixels. Does JPEG XL achieve the same thing?
  • quentindanjou4 hours ago
    Great article!<p>Overall I am getting that AVIF is better on the web...unless Lossless is needed, in that case better take JPEGXL.
  • throw0101c4 hours ago
    Perhaps useful:<p>* <a href="https:&#x2F;&#x2F;caniuse.com&#x2F;?search=avif" rel="nofollow">https:&#x2F;&#x2F;caniuse.com&#x2F;?search=avif</a><p>* <a href="https:&#x2F;&#x2F;caniuse.com&#x2F;?search=jpegxl" rel="nofollow">https:&#x2F;&#x2F;caniuse.com&#x2F;?search=jpegxl</a>
    • braiamp4 hours ago
      Note about caniuse: browsers dragged their feet with jpegxl while avif had the backing of the biggest browser in existence: internet explorer
      • jaffathecake4 hours ago
        Apologies if your comment was meant to be a parody as there&#x27;s a bit of Poe&#x27;s law around this stuff…<p>IE never supported AVIF. Edge even shipped AVIF later than Chrome. One of the leaders of JPEG XL worked at Google until relatively recently. A massive amount of JPEG XL development has been done by a team at Google.
  • Dylan168073 hours ago
    &gt; AVIF is basically the keyframe format of AV1 video, with a bunch of still-image-specific optimisations thrown in. Animated AVIF however, is pretty much just a repackaging of AV1 video.<p>What optimizations are being added? I thought it was basically the exact same codec, but different packaging and usually some adjustment to how the encoder is tuned.
    • jaffathecake2 hours ago
      tune=iq is the main bit <a href="https:&#x2F;&#x2F;aomedia.org&#x2F;blog%20posts&#x2F;Libavif_v1_4_0-Boasts-Major-Updates-to-Encoder-Technology&#x2F;" rel="nofollow">https:&#x2F;&#x2F;aomedia.org&#x2F;blog%20posts&#x2F;Libavif_v1_4_0-Boasts-Major...</a>
  • adzm4 hours ago
    &gt; AVIF is basically the keyframe format of AV1 video, with a bunch of still-image-specific optimisations thrown in. Animated AVIF however, is pretty much just a repackaging of AV1 video. You can convert an AV1 MP4 to AVIF and back losslessly - it&#x27;s just a container change. That&#x27;s why it performs so much better, because it&#x27;s built for motion.<p>So, is animated AVIF only keyframes &#x2F; p-frames, where each frame is independent from the other? I was under that impression, uncertain if there are any other capabilities it might have (like only updating part of the canvas when only parts change, like GIF supports)
    • jaffathecake4 hours ago
      No. I used to think this too, but it isn&#x27;t limited to keyframes.You can convert an AV1 MP4 to AVIF and back losslessly - even if it has non-keyframes. It&#x27;s just a different container. It has the full AV1 capability. Plus transparency.
  • moecables2 hours ago
    I don&#x27;t have any real use cases for jxl or avif or any other modern format b&#x2F;c I rarely host images but all these articles are always so interesting to me. And at the end of it, I&#x27;m left wondering, is there ever going to be a single winner here?
  • aadharshpan2 hours ago
    A little while ago, I chucked together a comparison game on image file formats (incl a stab at av2 images), encoders, parameters to back out preferences relative to ssimulacra2 and butteraugli: <a href="https:&#x2F;&#x2F;aadhar.sh&#x2F;pixel-peeper" rel="nofollow">https:&#x2F;&#x2F;aadhar.sh&#x2F;pixel-peeper</a><p>It does seem like AVIFs win on small images, and JXL gives you progressive rendering, easy upgradability on JPEGs, and better lossless and high bitrate images.
  • Klaus233 hours ago
    The question now is how much of AVIF&#x27;s advantage comes from the encoder compared to the image format itself. If it is the encoder, does JPEG XL even stand a chance of catching up? AVIF will certainly receive further improvements, albeit at a diminishing rate.
    • jaffathecake3 hours ago
      <a href="https:&#x2F;&#x2F;giannirosato.com&#x2F;blog&#x2F;post&#x2F;case-against-jxl&#x2F;" rel="nofollow">https:&#x2F;&#x2F;giannirosato.com&#x2F;blog&#x2F;post&#x2F;case-against-jxl&#x2F;</a> suggests JXL is fundamentally limited. We&#x27;ll see. There&#x27;s a race on and it&#x27;s great!
  • javier24 hours ago
    1. How long does size, encode time and resize take compared to good old jpeg?<p>2. Is it possible to encode AVIF with hardware acceleration?
    • jaffathecake4 hours ago
      JPEG is fast as fuck, due to it being designed for decades old hardware.<p>When it comes to hardware encoders, the nicest thing you can say about them is they&#x27;re fast. Software tends to do way better at quality. Hardware AV1 encoders will be tuned for video rather than stills.
  • shevy-java1 hour ago
    Some days ago we had a similar discussion here.<p>For me personally, AVIF is still better, for various reasons (not solely file size compression ratio as such, though this is my number one go-to objective; browser support is also useful but to me is not so important as it is).<p>I am keeping a close eye on JPEG-XL, but right now I am quite settled on .avif. All my local collection is in .avif, when before it was a mixture of .jpg, .png and a few animated .gifs. From my findings a few years ago, avif is superior to jpg, png and gifs on pretty much everything it matters. On very high compression, though, I also noticed artefacts, but we had that even more so with jpg, and for 1:1 comparable file size, avif beats jpg with both eyes closed.<p>By the way, great article. I hope he can do another review, based on that blog entry, in, say 3 years. Would be interesting to see how avif and jpeg-xl have improved. In all likelihood I will still keep on using avif, but if jpeg-xl is a real winner in some areas, I may use it. (Lossless is one area where jpeg-xl excels, but I don&#x27;t need to store satellite data; I want to store old family pictures in an efficient manner, and here it seems avif is better.)
  • Theodores4 hours ago
    Jake&#x27;s interest in F1 hasn&#x27;t waned, which is good to see. I am presuming that picture of an Alpine&#x2F;Renault at Goodwood is his 18Mb photo, but I could be wrong. Neither has his interest im image compression waned, which is also good to see. But why the move from Google to Firefox?<p>I am still on webp, thinking that I am on the bleeding edge in a world where artworkers are obsessed with pixels with JPG&#x2F;PNG as the only formats they know, which is an advance on GIF.<p>Every browser advertises what formats it will accept and if it is in &#x27;data-saving, low bandwidth mode&#x27;, so I just configure the CDN to keep the names the same &#x27;.jpg&#x27; but to send the bestest format for the situation&#x2F;browser, whether that be webp or AVIF, fetching super-high resolution files from the origin server, outputting them in &#x27;retina&#x27; resolution with none of those &#x27;picture&#x27; elements referencing half a dozen &#x27;responsive&#x27; sizes.<p>In this way nobody has to care what image format is being served, and if it is deemed that everything is way too compressed, the CDN can be flushed of the cached images, quality increased, and cache rebuilt.<p>It looks like I will need to update my server configuration to use JPEG XL in the usual five years&#x27; time, given the lack of any revolutionary benefit.
    • jaffathecake4 hours ago
      Yep, Alpine, and yep, Goodwood! Nicely done!<p>I was at Google for 10 years, then went to Shopify for 2 years, but I missed the web. For most of the time I was at Google, it mostly did what was good for the web, rather than pushing Google&#x27;s interests, but that started to change, which is one of things that led to me leaving. E.g. see what happened with the Prompt API.
  • dc3k4 hours ago
    I really hope that some day Firefox supports HDR AVIF images
    • jaffathecake4 hours ago
      It&#x27;s not AVIF that&#x27;s the issue, the blocker is supporting HDR in general.
      • dc3k3 hours ago
        Fair point. HDR images in Firefox just do not work at all, regardless of the format.
  • phoronixrly4 hours ago
    Ah, Chrome ships JXL when we already have a better codec for the web!
    • lern_too_spel4 hours ago
      PDF standardized on JPEG XL, and Chrome ships with a PDF renderer.
  • yhjc26924 hours ago
    It&#x27;d be interesting to scale this up to a lot of images - and have users blind A&#x2F;B test, like the LLM Arena on Huggingface which helped filter out &quot;benchmaxxing&quot; vs actual intelligence &amp; utility. Because 1) images can be so diverse* and 2) an intrinsic tradeoff might exist between general efficiency and out-of-distribution robustness.<p>It&#x27;s hard to rigorously judge a codec from a handful images, especially given the large impact they would have (with a widely adopted codec encoding bazillions of images in the coming years).<p>* There are many intricate details that go into codecs and visual perception. For instance, our sensitivity to visual errors are dependent on colors (<i>all</i> of hue, saturation, and brightness), spatial frequency of artifacts, local contrast and texture presence, et cetera.<p>And like OP mentioned, perceptual error metrics (including SSIMULACRA2) aren&#x27;t perfectly representative of human-evaluated visual quality. For instance, libjxl deliberately makes choices that hurt SSIMU2 scores, but improve human-rated quality.
    • janwas2 hours ago
      There was a large scale study a while back: <a href="https:&#x2F;&#x2F;cloudinary.com&#x2F;blog&#x2F;contemplating-codec-comparisons" rel="nofollow">https:&#x2F;&#x2F;cloudinary.com&#x2F;blog&#x2F;contemplating-codec-comparisons</a>
      • ksec1 hour ago
        That was done before AVIF had any improvements. Arguably one could even say JPEG XL competition brought the best of AVIF out.
    • jaffathecake3 hours ago
      There was a study done while I was at Google, and I fought for it to be done on high density screens, because that&#x27;s what most users have. The response was &quot;but people won&#x27;t be able to see the artifacts&quot; and my head nearly rotated 180 degrees.<p>But yes, you can see this with jixel, which I&#x27;m really impressed by, but it&#x27;s so tuned to SSIMU2 that it looks really bad to human eyes in some cases compared to libjxl.
      • eviks3 hours ago
        &gt; but people won&#x27;t be able to see the artifacts<p>But that is correct and why any proper study should first train the participants on the type of artifacts and trade-offs. Like the reference to JXL choices: think its creator mentioned that AVIF might look nicer for faces because it was &quot;smoothing&quot; them but it was a worse representation of the original. So the study participants would need to be conscious of that trade off and be clear in terms of what they&#x27;re asked to evaluate - whether the result looks nicer or whether it represents the original better.
        • yhjc26923 hours ago
          This is a good food for thought. Semi-related: It reminds me of the fact that smartphone cameras nowadays use ML based filters to make faces prettier before saving in the first place.<p>Perhaps we can use clever experiment design to address it, like doing a &quot;full-reference&quot; evaluation (e.g., pick most similar two images, out of encoder A, encoder B, and original) rather than strictly A&#x2F;B.
        • jaffathecake2 hours ago
          Its creator (me) mentioned the smoothing as a negative.
      • yhjc26923 hours ago
        I feel that!<p>Maybe the first step to designing better encoders is to build an extremely accurate visuoperceptual error metric. Seems like ML&#x27;s rapid progress haven&#x27;t caught onto it just yet.
        • janwas2 hours ago
          This was indeed what the JPEG XL effort started with :) The Butteraugli metric.
          • yhjc26921 hour ago
            Haha, that&#x27;s a great point! On that note - do you have any good pointers on understanding more about how Butteraugli works? I wholeheartedly agree it is a great metric (which aligns well with my subjective assessment much better than MSE or MS-SSIM), but the Guetzli paper (or the Butteraugli GitHub repo) does not explain the theory behind it in detail.<p>Seems like others were curious too, given the Wikipedia page on Guetzli mentions:<p>&gt; <i>Butteraugli. ... How the hundreds of parameters that model the properties of the human visual system were derived remains unexplained.</i><p>My rough understanding is its multi-scale convolution architecture was inspired by biological visual perception (perhaps how the layers of visual cortex gradually represent higher level features, ish), and involved some sort of empirical parameter tuning based on human evaluations. It&#x27;d also be a very nice resource for beginners wanting to learn more about image&#x2F;video codecs (like me :)
  • superkuh2 hours ago
    What good is a really small file size if small but significant fraction of the people who view the page see nothing at all? I loaded this page and I can read the text and see the plots but none of the example images display.
  • IshKebab3 hours ago
    To be honest it&#x27;s starting to sound like Google were right and adding JPEG XL support was a mistake.
  • 0xy4 hours ago
    AVIF is a lifesaver for animation with separate transparency layers so the transparency can change position frame by frame. The only other alternative is WebM which has Safari limitations.
    • jaffathecake4 hours ago
      But the performance is so bad it isn&#x27;t worth using. You&#x27;re better off encoding a double height AV1 and mashing it together with WebGL <a href="https:&#x2F;&#x2F;jakearchibald.com&#x2F;2024&#x2F;video-with-transparency&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jakearchibald.com&#x2F;2024&#x2F;video-with-transparency&#x2F;</a>. That&#x27;s how bad the situation is.
    • adzm4 hours ago
      Is there an advantage to this as a separate layer compared to just having an alpha channel baked into the image data itself? If not premultiplied then it would not affect the other channels either.
  • lofaszvanitt3 hours ago
    Most of these images are not at 100%. Use large images and show 100% crops everywhere.
    • jaffathecake2 hours ago
      You&#x27;re mistaking CSS pixels for device pixels <a href="https:&#x2F;&#x2F;jakearchibald.com&#x2F;2021&#x2F;serving-sharp-images-to-high-density-screens&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jakearchibald.com&#x2F;2021&#x2F;serving-sharp-images-to-high-...</a>
  • shmerl4 hours ago
    I think one overlooked aspect is that AVIF is container based. Meaning that once sites support, when AV2, AV3 etc. will come out, there won&#x27;t be a need to go through another very difficult phase of sites adoption - it will still be AVIF just with newer codec inside, and it will be just up to browsers to catch up on newer versions and newer codecs will address technical needs as times goes.<p>JPEG XL doesn&#x27;t have that benefit, while sites adoption is arguably a worse issue than browser adoption.<p>To demonstrate the point even for AVIF itself - it has been in the browsers for a while. Can you use it on common sites? Good luck if you can, even major sites like GitHub and GitLab have issues with it due to some site code depending on hardcoded list of known formats or other similar problems.
    • pornel4 hours ago
      The container is useless. Files based on a newer codec won&#x27;t display anyway.<p>ISO-BMFF container is bloated and needlessly complicated. AVIF decoders didn&#x27;t even want to reuse existing MP4 libraries for it due to all the baggage it brings, and implemented their own minimal parsers.<p>AVIF would have been better off with a simple wrapper similar to RIFF&#x2F;PNG or extending AV1&#x27;s own OBU header (which for inexplicable reason gets its data duplicated inside the HEIF container and then implementations are required to verify that both copies agree!)<p>I hope AVIF will skip AV2. We don&#x27;t need yet another almost-identical format to migrate to.
    • theandrewbailey4 hours ago
      &gt; I think one overlooked aspect is that AVIF is container based.<p>Many other image formats are. AVIF uses HEIC, the same container that HEIF does.<p>&gt; when AV2, AV3 etc. will come out, there won&#x27;t be a need to go through another very difficult phase of sites adoption - it will still be AVIF just with newer codec inside, and it will be just up to browsers to catch up on newer versions and newer codecs will address technical needs as times goes.<p>Fingers crossed, but AV2-based AVIF specs haven&#x27;t even been finalized, so who knows.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;AOMediaCodec&#x2F;av2-isobmff" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;AOMediaCodec&#x2F;av2-isobmff</a>
    • jaffathecake4 hours ago
      This doesn&#x27;t make sense to me. There&#x27;s enough content negotiation out there that AV2 will need a new content-type parameter. Feature detection is important to browsers.
      • shmerl4 hours ago
        I don&#x27;t think so. WebM doesn&#x27;t need new content type and it can ship AV1 and VP9 all the same.
        • jaffathecake4 hours ago
          What are you talking about? Video formats have a whole mad type parameter for this stuff <a href="https:&#x2F;&#x2F;jakearchibald.com&#x2F;2022&#x2F;html-codecs-parameter-for-av1&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jakearchibald.com&#x2F;2022&#x2F;html-codecs-parameter-for-av1...</a>
          • shmerl1 hour ago
            It&#x27;s not mandatory, and it would work without using it. The whole point is for forward compatibility support effect for sites which are very slow introducing these kind of changes.
            • jaffathecake27 minutes ago
              It&#x27;s not mandatory. But if you don&#x27;t use it, the browser may select a source it cannot play.
              • shmerl20 minutes ago
                Possibly, but as above, a much slower problem to solve is not in the browser support, but in sites support. Browsers in practice move way faster.
    • arendtio4 hours ago
      Can someone please explain the downvotes?
      • pwg4 hours ago
        My guess: because the OP forgot that to decode AV2&#x2F;AV3 it matters not that it is in an AVIF container, it matters that the display system (browser, etc.) actually have the codec available to it that can decode the new format (AV2&#x2F;AV3&#x2F;etc.).<p>With no codec for a new compression algorithm, it does not matter if the browser can read the container, you still see the &quot;broken image&quot; icon on your display.
        • shmerl4 hours ago
          You didn&#x27;t get the point of the post. I explained why and how container matters here. Not a specific container, but just the idea of container itself. Hint, it&#x27;s not the browser.
          • ksec1 hour ago
            I don&#x27;t get it. And to me it wasn&#x27;t clear in the post. As others have explained the container and codec are two separate issues.
            • shmerl18 minutes ago
              Concrete example. Let&#x27;s say GitHub will add AVIF support at some point (it&#x27;s not yet handled well by the site as you can notice[1].<p>You as user can then upload AVIF images to wherever images on the site are processed. And after that, let&#x27;s say when newer codec inside AVIF will get a good browser coverage, you&#x27;ll be able to start using it without waiting another decade for GitHub to pipe it through their site code.<p>For formats without a container, it&#x27;s always a two step process. Browser coverage first, then another huge period of sites support catching up.<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;orgs&#x2F;community&#x2F;discussions&#x2F;138164" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;orgs&#x2F;community&#x2F;discussions&#x2F;138164</a>
  • pdfutils26 minutes ago
    [flagged]
  • 5324_13 hours ago
    [flagged]
  • whodeven4 hours ago
    [flagged]
  • JyrkiAlakuijala55 minutes ago
    [flagged]
  • Androcles4 hours ago
    [flagged]