This experiment provides a visceral look at digital entropy, proving that even advanced compression algorithms can't escape the cumulative toll of re-encoding. It is a sobering reminder that in the world of lossy formats, every save is a step toward irreversible decay.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
What If You Repeatedly Save an Image as a JPEG, then WebP, then Avif?Added:
What happens if you save an image as a JPEG, then resave it as a lossy WebP, then resave it as a lossy AVIF, and then repeat this cycle forever?
Well, the exact settings you use when saving will ultimately shape what happens, but here you can see the images are evaporating into a magenta haze.
For these examples, I'm using the max quality for each image type with a common chroma subsampling value of 4:2:0.
Quality generally relates to how well details in the image are preserved, while chroma subsampling controls how much color information is stored. A value of 4:2:0 is what lossy WebP images use, and it reduces color information while maintaining reasonably good quality images.
Interestingly, if we drop the quality by half, there's more of a melting block effect without the magenta drift. So, what's happening here is a classic [music] case of generation loss. Each image compression algorithm tries to remove information that's less noticeable to the human eye, but in doing so, it introduces small artifacts.
When the next format re-encodes the image, it treats each of these artifacts as real detail, and over hundreds of iterations, these tiny errors accumulate and reinforce each other, slowly destroying the image.
If we stick to a single image type for repeated saves, we see that for this photo, both the JPEG and AVIF images stabilize pretty quickly, while the WebP image continuously breaks down, though not completely. If we drop the quality from 100 to 50, the JPEG and AVIF images stabilize quickly and look pretty good, but the WebP image totally blows up. As a slight aside, the JavaScript library I'm using for saving images has a smart subsample option for WebP images, which improves the quality of the chroma subsampling. If we turn that off, the WebP image breaks down in a slightly different way, with the reds bleeding color rather than drying up. Now, does this version of a WebP affect our JPEG WebP AVIF cycle in the same way? Well, here you can see a side-by-side comparison. Smart [music] subsampling seems to lead to more dramatic results initially, but both images ultimately disintegrate.
If we restrict ourselves to two image types, we can see that including a WebP step seems to be what's throwing things into chaos. Similar to its counterparts in the single image type results, the JPEG AVIF cycle seems to stabilize fairly quickly, with the resulting image not looking too bad. If we turn off chroma subsampling in JPEG and AVIF files, we seem to get significantly less color bleeding. This makes sense since chroma subsampling reduces color information and is known to cause color bleeding artifacts.
It might be interesting to see what would happen if we could turn off chroma subsampling in lossy WebP images, but it's unfortunately a fixed constraint of the lossy [music] WebP format. Now, you might be wondering, "Pat, what about GIF files? What if we add that format to our file saving cycle?" Well, when we add that to the mix, the color bleeding stops, but the image still winds up degrading into a blobby mess. GIFs are limited to just 256 colors, so values get pinned back to a smaller set of colors each time rather than slowly drifting. I think it's less visually striking than the JPEG WebP AVIF cycle, but it's a nice demonstration of how a single format in the chain can completely change how the image falls apart.
Anyway, the takeaway here shouldn't be don't resave your images or don't use WebP. In practice, you're probably not repeatedly saving between formats, but it does reveal something real about how these algorithms work. They're not simply preserving your images, they're making assumptions about what you'll notice, and when you stack these assumptions across formats and thousands of saves, you wind up with something that barely resembles what you started with.
That's all for today. Like, subscribe, and thank you for watching.
Related Videos
Agentforce NOW AMA: Build with React and Salesforce Multi-Framework
SalesforceDevs
490 viewsβ’2026-05-28
How agent o11y differs from traditional o11y β Phil Hetzel, Braintrust
aiDotEngineer
450 viewsβ’2026-05-28
Re: π£οΈπthepropheduπ2026 GST 103 CLASS (E-EXAM REVISION)
theprophedu
636 viewsβ’2026-06-04
WEB TECHNOLOGIES UNIT-2 | Degree 4th sem BCOM Computers web technologies unit-2 full explanationπ―β
LearnwithSahera
1K viewsβ’2026-05-29
More tests are always better? How to use AI to identify tests that bring little value
Alliance4Qualification
335 viewsβ’2026-05-29
Search Algorithms Explained in 60 Seconds! π€π¨
samarthtuliofficial
218 viewsβ’2026-06-01
People of Game of Thrones using JavaScript DOM
AltCampus
296 viewsβ’2026-05-30
Instagram accounts got PWNed
EricParker
13K viewsβ’2026-06-03











