What question am I trying to answer?
For starters, go visit the associated /experiments page.
Why does converting a .png
file to a .webp
obtain a smaller size than the same image in .jpg
format being converted in .webp
?
Some stats (without the images)
Here is the same table from the /experiments page but without the images.
(Styling will be funky because I usually use tables for image collages in markdown, so I am inlining CSS in the .md
file)
Image title | JPEG/JPG | PNG | JPEG/JPG -> WEBP | PNG -> WEBP |
---|---|---|---|---|
Our lovely neighbor - Boris Groh | 336 KB | 1.5 MB | 225 KB | 94 KB |
bullpup | 116 KB | 598 KB | 100 KB | 39 KB |
James Webb telescope image | 5 MB | 29.5 MB | 3.2 MB | 577 KB |
Windows wallpaper | 455 KB | 95 KB | 222 KB | 122 KB |
As you can see, in most cases, converting an image from a .png
to a .webp
instead of .jpg
-> .webp
, will greatly decrease the output image size, with no change (at least visible) in quality.
Why is that?
I have no idea, but I want to find out.
If you see this page and have ideas or knowledge on the subject, please DM me on X/Twitter.