If you have used tools like Google’s PageSpeed Insights, you probably have run into a suggestion to use “next-gen image formats”, namely Google’s WebP image format. Google claims that their WebP format is 25 – 34% smaller than JPEG at equivalent quality.
[…]I think Google’s result of 25-34% smaller files is mostly caused by the fact that they compared their WebP encoder to the JPEG reference implementation, Independent JPEG Group’s cjpeg, not Mozilla’s improved MozJPEG encoder. I decided to run some tests to see how cjpeg, MozJPEG and WebP compare. I also tested the new AVIF format, based on the open AV1 video codec. AVIF support is already in Firefox behind a flag and should be coming soon to Chrome if this ticket is to be believed.
Spoiler alert: WebP doesn’t really provide any benefits, and since websites generally use JPEG as a fallback anyway, you end up with having to store two images at the same time, defeating the purpose entirely.
Interesting. I’m wondering why closed ecosystems like WhatsApp went with webp, rather than sticking with JPEG.
Fashion, that’s why (WebP is the cool new thing to have). That’s what drives web development framework and standards (which is why you should stay well away from web development as a professional developer, web development and games are the only two things I won’t do personally)
kurkosdr,
Haha, that’s funny. My CS degree is totally wasted on web development, it doesn’t even fit the nature of the work at all, yet for reasons that are totally unfair having a CS degree makes it easier to land web dev and sysadmin jobs. My work is primarily web development, and it sucks, but that’s where most of the work is for businesses in my area. Outsourcing and consolidation has really killed the need for most companies to do in-house software. I jump at opportunities to do something more challenging, but at least in my case those have been “gig jobs” that last a couple weeks/months and then onto the next job.
At least CS skills can be a good fit for the gaming industry, however I too have heard the horror stories in that industry. Still, it’s supply and demand. So many people aspire to be game developers that the industry can exploit the labor and throw them away when they’re burnt out. There are no consequences because there’s an endless supply of newly minted grads willing and able to take their place.
Compare this to mainframes, which few grads aspire to work on, the job dynamics are completely different.
Any ideas about it’s privacy policy?
The purpose of more efficient compression isn’t saving server disk space, as you are assuming, but saving *bandwidth*, which then means more users can be served at the same time.
Of course it also makes the service more accessible to more people around the world, as internet speeds, data caps and latencies become less critical.
You missed the point.
If, as stated in the article, WebP does not compress any better than MozJPEG, THEN you are indeed just wasting disk space to store two images for no reason.
Thom is a linguist so he ought to know how to use the language, and he decided to say what he said, so I must take it for its face value.
But: testing based on one single image is worthless — the results can only be judged after encoding hundreds or thousands of different pictures and looking at the big picture. Each codec has its advantages and disadvantages and a single score by a computer algorithm could also be biased in that it appreciates gain in detail in one aspect more than devalues losing details elsewhere.
sj87,
Just wanted to point out that the author actually tested 24 images. It wasn’t clear in the interface, but you can switch by clicking on the “Kodim” text.
Hi..
So, is WebP better than JPEG? It depends if you are using the reference libjpeg library or the improved MozJPEG encoder. WebP seems to have about 10% better compression compared to libjpeg in most cases, except with 1500px images where the compression is about equal.
you can take the more information then click here Google Klanteservice
Wut?
It’s spam masquerading as a post. Stick a bit of the article into what almost seems like a comment with a link to a third party, and hope that idiots click the link.
If only we had a report button…
kurkosdr,
Now where’s that upvote button?
Alfman didn’t you say you can do web development ?
Lennie,
Yeah, I’ve offered a couple of times.
When osnews migrated to wordpress I wanted to fix several things and wanted to help but they never took me up on it. The new commenting system in particular is so tedious for long discussions. The old site had the ability to view comments by date, wordpress does not. So I made up two prototypes to see if I could make it better with nothing more than clientside javascript.
http://vocabit.com/osnews/
The first prototype ended up being a bit silly, but if you look it provides a timeline with a heatmap on the right hand side of the screen that you can scroll and click through.
The second prototype works pretty well IMHO and I was under the impression that osnews would incorporate some version of it. It adds a button to each comment that toggles threaded view versus chronological view while maintaining the comment’s position on screen. This way you can easily view all the new posts in order, but it’s trivial to see where they are in threaded view. I have a couple more ideas to make it better, but alas osnews didn’t use it so we’re kind of stuck with the wordpress comments we’ve got.
For a time I had this installed as a local browser extension, but mozilla are dicks and keep breaking those…ah but that’s a whole other thing, haha.
Reminds me of the second wave MP3s where the MP3 encoders were so good they beat encoders of technically superior formats..
Like what formats? MP3 is still a bad format due to aliasing appearing as fine hiss.
The mozjpeg version is noticeably blurrier than the cjpeg version. Maybe it doesn’t matter that much to some people – but this is not an apples to apples comparison.
CaptainN-,
It was quite subtle, I had to look at the zoomed in version to see it but you’re right. mozjpeg did not represent corners as well in this image.
I also noticed that the webp and avif were worse than both cjpeg and mozjpeg at keeping textures in mostly solid regions. Look at the upper right hand shutter for example, webp makes it look like it had no texture at all, it’s just all smudged.
Also look at the shutter at the bottom right. webp is the only encoder that seems to have erased the left edge completely, bizarre.
Given that these are all different lossy encoders that are throwing away different details, you’re not going to be able to get an “apples to apples” comparison. They’re inherently based on perception. I’d like to see more samples like this, but it seems that at least at these bitrates mozjpeg could have sharper edges, but webp is dropping details so I personally can’t call it better.
I completely agree. I was mostly pointing out that making some kind of moral/tribal pronouncement about which one is “better” or “best” based on one subjective test this is super weird. These are tools. Back when I used to do a lot of ad work, and needed things to fit inside a 40K budget, I’d have loved to have options like these.
Another HUGE aspect of these images is how they deal with different color ranges. For example, JPEG just absolutely destroys reds. If you have let’s say a photo of mostly green shrubbery with some bright red roses, you are going to struggle to get anything reasonable looking with JPEG, for size sensitive purposes. It’s great to have options in these cases.
In my own testing WebP beats JPEG by a large margin.
I’ve managed to compress my 24MP DSLR camerar images to 40% of their original size without any perceivable loss of quality.
Sorry, this testing and its conclusions are very limited. WebP rocks.
birdie,
There may be some differences between what you did and what the author did. He’s suggesting that not all JPEG algorithms are equal. What encoders and settings did you use? If you’re taking an original high quality jpeg from the camera and recompressing it, well of course that’s going to be smaller, but that’s because you’re asking webp to throw out more detail. You could have used mozjpeg encoder and done the same thing.
I’m not saying one is better than the other, but as mentioned in the discussion with CaptainN- we can see that JPEG and WEBP are both dropping different kinds of visible details. Webp seems to favor dropping detail in textures whereas mozjpeg seems to favor dropping detail around borders. It’s tough to argue that one is better than the other, it seems kind of subjective to me. And given that I have to look very closely in either case, I think it’s too close to call.
Would you like to share your own samples, we can give our opinions
vs.
I’m not sure you even read my message correctly. I’m obsessed with fine details and picture quality – my WebP encodes are indistinguishable from their JPEG originals otherwise I wouldn’t bother to compress at all. I even used Photoshop “difference” blending mode to make sure the results are as close to the originals as possible.
As for the compression settings, here they are (part of the script I’m using):
cwebp -q 94 -m 6 -mt -af “$i” -o “$new”
birdie,
I realize what you are saying, but I’m not sure you realize what I’m saying. The JPEG originals from the camera isn’t throwing out as much detail as webp does when you re-encode it. You really need to test re-encoding using mozjpeg as the author suggested for it to be a fair test.
From his samples, it’s easy to see that webp and mozjpeg both drop details, it is only indistinguishable until you look closely enough. For a sufficiently large image at sufficiently large dpi you probably wouldn’t notice the loss of detail with webp or jpeg, it’s when you loose closely that you’ll see the loss of detail. But I’d like to see more samples.
I’m not claiming jpeg is better, but clearly they’re both dropping details that we can see when we look closely enough. Those details may not be too important, but regardless to be objectively fair you’d need to compare the reencoded webp to a reencoded jpeg at similar sizes.
This year all the patents related to jpeg200 should expire. I have been waiting since forever
https://xkcd.com/2254/
Pi-hole beats both formats by not loading any of the annoying spyware most sites are riddled with nowadays.