Back to News
Advertisement
Advertisement

⚡ Community Insights

Discussion Sentiment

70% Positive

Analyzed from 2856 words in the discussion.

Trending Topics

#jpeg#image#avif#format#progressive#support#web#jxl#lossless#images

Discussion (44 Comments)Read Original on HackerNews

Feathercrown•about 1 hour ago
"For non-photographic images, the argument that “they should be vector images” doesn't hold up because many images could be vector images but aren't, and they can't be vectorized perfectly. “The world should be different” is not a justifiable defense against optimizing for the way the world actually is."

This is a good paragraph. I see people forget to apply that last sentence all the time.

karim79•11 minutes ago
Agreed. JPG is the most popular format for photography. PNG, the lossless format is great for diagrams and stuff with sharp edges. It can be "compressed" via dithering and quantization.

GIF is there... because it will always be there because it's just a hit that will never go away. It's also lossless (when discounting colour depth).

The new formats are interesting webp, avif, JXL and so on.

Jpeg classic is the clear winner IMHO and will probably never be less relevant than the new fancier formats. JPG even does text and sharp edges, reds, and so on well if you tell your process to take into account chroma subsampling!

It's magic and it puts food on my table.

nneonneo•about 1 hour ago
That JPEG XL prime computation is a pretty ugly DoS. Just selecting it in Finder, with the preview pane open, maxed out every core on my Mac inside a QuickLookSatellite that also ate 4GB of RAM while doing so - for a good 15 seconds. Not bad for a 2KB picture. It seems like Apple did not set sane limits on their JXL previewer.

It is, however, an incredibly cool demo of what the format is capable of. I'm not completely sure if an image format should be that flexible, but I'm impressed nonetheless.

est•about 1 hour ago
I wonder if similar hacks apply to zlib and .png as well.
wmf•11 minutes ago
nneonneo•about 1 hour ago
Probably not; for PNG, the image size is declared in the header, so a decoder can decide immediately if it wants to decode the image or not. The output is bounded by the size of the image times the bit depth, and decompression runs in time proportional to output size. zlib bombs exist, but they don't affect png because a decoder can simply refuse to decompress past the size of the pixel buffer.
tacomagick•30 minutes ago
The infamous PIL DOS errors, rooting from the library refusing to process images larger than a hard limit. Does this mean though JXL does not have that data accesible quickly?
aniviacat•about 1 hour ago
> Progressive rendering (which AVIF supports) decodes a low-fidelity rendition before the full image arrives. AVIF didn't support progressive rendering for a while, and during that time I believe it was deeply oversold. Now that libavif has implemented it (it was always possible), the conversation appears to be over.

This is false. AVIF does not support progressive decoding/rendering. What the author is referring to here is image layering. A lower resolution image layered below the full resolution image, which is loaded and rendered first. That is not progressive decoding/rendering. It is a thumbnail.

Unlike AVIF's false advertising, JXL truly supports progressive decoding/rendering. With JXL, you do not first load a thumbnail before loading the actual image. The lower-quality image that JXL shows while decoding is derived from the data of the actual, full-resolution image.

juliobbv•5 minutes ago
> A lower resolution image layered below the full resolution image, which is loaded and rendered first.

I'm curious, where did you learn progressive AVIF works like this? Have you actually read the spec, or does your understanding comes from somewhere/someone else and never challenged the truthfulness of it?

Progressive AVIF is truly "progressive" -- it never involves "loading a thumbnail" or "layering an image over another". In reality, each pass can refine previous ones (thanks to AV1's inter-encoding toolset), avoiding storing redundant information between passes. The viewing environment doesn't need to render a given pass if a subsequent one has already been downloaded. Finally, scaling is configurable -- you can have your first pass already be at full res, just at a lower quality.

Hope this helps clarify how progressive AVIF actually works under the hood.

derf_•10 minutes ago
> A lower resolution image layered below the full resolution image, which is loaded and rendered first.

Unlike a thumbnail, higher-resolution layers can be predicted from the lower-resolution layer, so those bits are not wasted. That is not possible by layering <img> elements.

computerbuster•43 minutes ago
Not sure if the difference is materially relevant to UX at all. JPEG XL achieves progressive rendering at a great cost to its selection of coding tools, so I side with AVIF's approach.
brigade•22 minutes ago
You're wrong. AVIF does support spatial layering where the full-resolution image is derived from the lower-resolution layer, and cannot be decoded independently.

Yes, the format is not inherently progressive. But having the fine steps in progressive quality that JPEG-2000 and JPEG-XL have has less general usefulness than the amount of words complaining about it.

F3nd0•16 minutes ago
Can a similar technique be employed in JPEG XL, or does the format not allow for it in any way?
MiroslavPokorny•33 minutes ago
How does progressive rendering actually that most OS GUIS are not multithreaded ?

The preview in finder is still going to block. Im saying this as a MAC user speaking of experience browsing mounted drives that sometimes are slow and it feels like the window freezes up.

wmf•8 minutes ago
Progressive rendering is intended for the Web and it does work.
edflsafoiewq•about 1 hour ago
Does the difference matter?
cpburns2009•39 minutes ago
Progressive rendering is just a different way to layout the pixel data. Embedding a thumbnail is storing two distinct images. In other words, progressive rendering should be more efficient space and bandwidth-wise.
edflsafoiewq•22 minutes ago
The DC coefficients in a progressive JPEG are literally an embedded thumbnail (a 1:64 copy of the original) right? Is the question if the second "layer" replaces the thumbnail or layers corrections on top of it? It wasn't clear to me which AVIF does.
oofdere•39 minutes ago
Yes, if you look at the demo, the "progressive" AVIF loads a visible image at 8.5KB, and at that point, it looks better than the progressive JXL. However, that is ALL the AVIF shows until the image has fully loaded. At around 98KB, the JXL looks significantly better, and at around 240KB already looks really close to the final image, while the AVIF still looks terrible. At 280KB when the AVIF finally loads, they look identical.
F3nd0•14 minutes ago
Which sounds very useful if your connection is slow enough to make use of progressive image decoding. (Often enough the case for me.)
tacomagick•32 minutes ago
Of course it does, with one you have to render twice and store two layers which costs you both compute and storage. With the other you can just take the image mid decode at a point and display it. Single decode operation, no layer mess.
charcircuit•29 minutes ago
You have to render twice and have 2 different layers in both scenarios. Writing to a buffer / layer is not an atomic operation so they need to be separated.
aniviacat•40 minutes ago
The difference matters, as it means that AVIF's "progressive decoding" serves no technical benefit and is only a minor ergonomic benefit: On a website, you could achieve the same effect simply by layering two <img> elements on top of each other, one with the thumbnail and one with the final image.

If layering to <img> elements is fine for your use case, then it simply means you have no need for progressive decoding.

joeblubaugh•about 1 hour ago
If JPEG XL doesn’t become useful on the web, is it really likely to become popular with camera manufacturers, professional image editing tools, etc?

What does it offer there that existing workflows can’t support? Do those advantages make up for the transcoding that every web publisher would need to do to make the outputs useful on the web?

pwg•43 minutes ago
> If JPEG XL doesn’t become useful on the web, is it really likely to become popular with camera manufacturers, professional image editing tools, etc?

I suspect that eventually, the browser makers that are reluctant to add JpegXL support will do so, even if reluctantly, and so it will eventually "become useful on the web".

The reason why is Adobe added JpegXL as a compression format for PDF's, and as every browser maker wants their browser to also be a "PDF viewer", this means they must include a JpegXL decoder to be able to support PDF's going forward. If they must have a JpegXL decoder anyway, it is not that difficult to also add it as another supported format for the <img> tag.

computerbuster•41 minutes ago
Looking forward to a future where we can arbitrarily DoS anyone with a PDF that computes massive swaths of prime numbers.
eviks•1 minute ago
Can't that future adopt basic resource / complexity limits to defuse the DOS bomb?
dannyw•about 1 hour ago
I’ve been shooting with semipro to pro cameras for decades across brands, and I haven’t came across a single camera that supports shooting JPEG XL.

HEIF is what is getting support in recent models; but JPEG still rules supreme for its compatibility.

computerbuster•about 1 hour ago
Web publishers should definitely be stripping metadata at least, and transcoding isn't much harder. For anyone who cares about bandwidth, transcoding to efficient formats is non-negotiable; if you don't, then why do anything? Just ship PNG, who cares?

I think one of the compelling use cases for camera manufacturers would be an interoperable format for editors. Since JXL has support for so many channels, you could load your image into an editor, edit it, add layers, etc., and export as JXL, which could be used for other things.

dmix•about 1 hour ago
I wasn't really sold on the argument initially, given they admit there's some real lossless usecases, but this is a good bit from the conclusion:

> Not to mention an additional compatibility headache now exists for anyone just trying to download an image from the Internet and use it somewhere – it was hard enough to get widespread WebP adoption, and I don't think it's worth doubling the pain by having to climb the same hill for AVIF and JPEG XL. Especially when JPEG XL doesn't appear to add anything to the Web platform.

It is very annoying downloading an image for the web and then trying to upload it somewhere else also on the web during these transition periods.

computerbuster•about 1 hour ago
There exist lossless use cases, for sure. I think most people would be well-served by high-fidelity lossy that saves a lot of bits while still looking perceptually identical. Whoever isn't served by that most likely doesn't care about size savings, and can stick with lossless PNG.
vkaku•about 1 hour ago
We all know these aren't purely technical reasons, it's to break the monopoly of one Internet Company's decoder format portfolio. You can't let one Fruit Company's format be the thing either, so it's basically a L for engineering but a W for pleasing everyone TBF.
computerbuster•about 1 hour ago
AVIF is royalty-free, with open-source implementations not developed by Google. Google's implementation is libaom; as you can see, SVT-AV1 beats it. SVT-AV1 is developed by a number of companies – historically Meta, Netflix, Intel, independent contractors, and others. I worked on SVT-AV1 myself. I don't see how this is a bad thing for everyone, even if Google drove standardization of AV1?
derf_•2 minutes ago
There were something like 40 companies involved in AV1 standardization. Quite a few technical contributions did not come from Google, and quite a few of Google's proposals were substantially modified by feedback from others before they were included (and not all of them were eventually included).

Source: I lead Mozilla's technical contributions to AV1.

throw0101a•36 minutes ago
> You can't let one Fruit Company's format be the thing either, so it's basically a L for engineering but a W for pleasing everyone TBF.

What exactly is "Fruit Company's format"?

BenjiWiebe•29 minutes ago
I'm guessing HEIC.
Dwedit•about 1 hour ago
Much like WEBP, JPEG-XL is two different codecs in one. There's VARDCT mode, and Modular Mode. Modular Mode is normally used for lossless, but it can also be used for lossy as well. When you use Lossy Modular Mode, you get different kinds of compression artifacts than what you'd see in a JPEG file.

For Lossless: JPEG-XL wins, then WEBP, then PNG. (Sometimes lossless WEBP wins)

For Lossy: AVIF wins, then JPEG-XL, then WEBP, then JPEG.

computerbuster•about 1 hour ago
Lossy Modular isn't efficient enough to compete with even JPEG.

Also, look at the graphs – Iris-WebP beats JPEG XL.

computerbuster•about 2 hours ago
I'm the author if anyone has questions – AMA
wmf•3 minutes ago
I have a lot of basic questions about the CVVDP graph. Is the X axis encoding or decoding speed? Is higher better on the Y axis? What format is Aperture? I assume "aom" is AV1 but it wouldn't hurt to document it.
adzm•about 1 hour ago
Lossless was discounted due to webp, but doesn't webp lossless only use 8bit depth RGB? (I think it is important to have a separate file extension for lossless stuff anyway, otherwise it gets confusing quickly)
computerbuster•about 1 hour ago
Lossless was discounted because lossless just isn't very useful on the Web
dylan604•about 1 hour ago
I can tell you that I don't care if the AI slop used in everyone's AI generated blog is lossy compressed. In fact, expecting it to be of such import that lossless is required is pretty farcical.
pkulak•about 1 hour ago
We have to apply some weight to the fact that one is open, one isn't, right?

EDIT: Oh! Of course. AVIF is based on AV1. For some reason I was thinking HEIF the entire time I was reading the article. Man... withdrawn!

Really good read, btw. Very good points.

computerbuster•about 1 hour ago
AVIF is royalty-free, & SVT-AV1 and libaom are open source.

Edit: saw you corrected. Much appreciated!

dannyw•about 1 hour ago
SVT-AV1 is also more than just open source in name only; development and discussions happen in the open; with many community forks that’s now getting upstreamed/merged.

It is a true open source project; not just an open source license.

abhinavk•about 1 hour ago
Both are open I think.
vlmutolo•about 1 hour ago
What do you think the best use cases for jxl are? Where does it still have an advantage over other formats?
computerbuster•about 1 hour ago
I think it is a potentially good camera format, good medical & scientific imaging format, good RAW compression format (Apple uses it in some newer iPhones for this), good media interchange formats for tools like Photoshop (think about storing all of your layers inside of one JPEG XL that's fully compatible with .psd files), and more. It is incredibly expressive and versatile, which is what makes it so risky on the Web.
rmunn•about 1 hour ago
I would argue that even if JPEG XL isn't the best choice for Web images, if browsers don't support it then that will widely hinder its adoption for its non-Web use cases. Would you agree?

The scenario I'm thinking of is sending a photograph by email. Let's say Sally has just had her second baby, and wants to send baby pictures to her mother, the baby's grandmother. Neither Sally nor her mother are computer professionals, and they don't want to care about image formats. Sally wants to upload a file from her camera, attach it to an email, and send it. Her mother wants to click on the email and see pictures of her new grandchild. Neither one of them wants to have to convert the image themselves.

Let's say it's a few years in the future and Sally's camera produces JPEG XL files by default. (Which I don't think would happen if browsers didn't support it, for exactly the reason I'm about to articulate). If Sally's mother's browser doesn't support displaying JPEG XL, then although Sally (who uses a different browser than her mother) sees the picture in the email when she sends it, her mother writes back an email saying "the picture didn't show up, can you resend it?" And they spend a few back-and-forth emails before finally getting tech support from a friend who helps Sally convert the picture to old-school JPEG so her mother can see it.

If that's the experience for end-users, cameras would hesitate to switch to JPEG XL as a default format. Because nobody wants a hostile review from a user saying "My mother couldn't load my baby pictures, what kind of lousy camera are you making?"

So even if it's not the best format for the Web, I'm still persuaded that having universal browser support for a format intended for photos is an important factor, and devices like cameras will not switch to it as a default format until manufacturers are certain that browser support (and OS support, and electronic photo frame support, and so on) is nearly universal.

None of that takes away from the argument "Other image formats are better for saving space on the Web", which is the main thrust of your post. But I do disagree with the last line, "I'm just not personally convinced we need it in browsers any time soon." I believe that if browser adoption is lacking, adoption of the format in places where it makes lots of sense (like cameras) will also be slow.

What are your thoughts on that argument?

computerbuster•about 1 hour ago
> But I do disagree with the last line, "I'm just not personally convinced we need it in browsers any time soon." I believe that if browser adoption is lacking, adoption of the format in places where it makes lots of sense (like cameras) will also be slow.

I'm not even personally convinced it is useful for cameras. Sally's situation isn't particularly bandwidth or feature-constrained, so JPEG or PNG work. Maybe JXL is solving problems that don't exist?

rmunn•23 minutes ago
HDR is something many photography enthusiasts are interested in, and the ability to losslessly transcode from JPEG to JPEG XL (and back again if you have to) is actually IMHO the "killer app" for the format. Many people have years of irreplaceable family photos in JPEG format, and being told "you can fit 30% more photos on the same hard disk without any loss of quality" would certainly sell me on converting my photo library to JPEG XL. (The jpegxl.com site says "up to 60% smaller" so I'm going to guess that 30% is a safe average gain and it might be more).

And nearly everyone who takes photos of their family ends storage-constrained on cameras at some point. Memory cards only holding so much is less of an issue than it used to be, but in my experience the only people with laptops that have more than 1 TB of disk space are the computer professionals I know; every non-computer professional I personally know has 1 TB or less, usually 512 GB. That's room for plenty of photos, but not an infinite amount, and the photo collection (plus videos of baby's first steps and so on) is competing with a lot of other things for storage space. So being able to shrink the collection size by 30% or more with no artifacting added is definitely going to be worth it for one of the biggest selling points for cameras. (Including the cameras on smartphones).

I wouldn't say that JXL is absolutely vital and the industry should switch right now. But I would say that it's likely to be the only image format that has a chance to displace JPEG among the average camera user. Having JPEG in the name is also going to be a major selling point; don't underestimate that. (And the JPEG <-> JPEG XL conversion being lossless will complete the selling point).

Since (if I'm right) it's going to end up ubiquitous, then even if another format would be technically better, it would be wise for everyone writing software that handles images — browsers, OS file explorers, and so on — to make sure their software can support it. Just on general principles of supporting every widely-used format and every format that looks likely to be widely-used in the future.

alwillis•35 minutes ago
> I would argue that even if JPEG XL isn't the best choice for Web images, if browsers don't support it then that will widely hinder its adoption for its non-Web use cases.

Both Firefox and Chrome [1] have committed to shipping JPEG XL later this year. Safari has supported JPEG XL since 2023, though their implementation doesn't support progressive images yet.

So the major web browsers will support JPEG XL later this fall.

[1]: "Intent to Ship: JPEG XL" - https://hacks.mozilla.org/2026/08/intent-to-ship-jpeg-xl/

adzm•about 1 hour ago
I didn't realize progressive AVIF was a thing recently either; the comparison between that and jxl was pretty surprising.
nneonneo•about 1 hour ago
Worth noting that this progressive AVIF, when viewed in Chrome, has only two states: a "base layer" which pops in around 8KB, and the full image which appears 270KB later. The comparison JXL continues to refine during most of the download, so it winds up looking substantially better than the AVIF at around 95KB loaded, and looks pretty good (almost as good as the full 280KB AVIF) by 175KB. I suspect that there are a lot of knobs to turn for both progressive modes, but this particular case could definitely be cherry-picked to favour either codec.
juliobbv•26 minutes ago
Progressive AVIF is very flexible: it supports up to four passes, at configurable quality and dimension scaling levels. You can have any given pass reference up to two previous ones for refinement (thanks to AV1's strong inter-encoding capabilities), and you add filters to non-final passes (like blurring) to achieve a desired loading aesthetic.

That JXL page happens to use two passes, but the knobs are there to customize the experience to fit the use case.

computerbuster•about 1 hour ago
I believe wholeheartedly that AVIF's approach is significantly better UX.
oofdere•28 minutes ago
What exactly is AVIF doing in this case that I can't do with two <img> tags at a smaller size? I can easily create a thumbnail that beats the AVIF quality in less than the 5KB delta between the static and progressive version in Squoosh.
est•about 1 hour ago
Perhaps it's just a bad example. I suppose avif can support multiple "scans" of progressive encoding as well.
sroussey•about 1 hour ago
All my photos are HEIC. Why not just use what I have and not translate?
computerbuster•about 1 hour ago
Think about how many images large platforms deliver every day, and the benefits of saving bits on each of them.