Live data from Hacker News

Is WebP really better than JPEG?

siipo.la

131–140 of 319 posts

Re: Is WebP really better than JPEG?

#131
post #122
post #86

Every time I run an image comparison, the webp version looks worse and yet Google insists it's the same quality. It's baffling. Even if the above were just an individual... bafflement? and not an actual issue, the size savings really don't seem worth the compatibility hassle, the extra manpower/workflow complexity to support 2 formats, the additional storage (and caching) caused by this duplication. And the above is…

I also don't get it why people insist on the same quality with lesser size. How about more quality and the same filesize?

The answer is simple: money

Re: Is WebP really better than JPEG?

#132

I just relaunched a website that makes extensive use of photographic collages that necessitate alpha backgrounds. They were previously shipping "retina-grade", multi-megabyte images all over, a typical page load could easily reach 25mb. I managed to refit it with ` ` tags using WEBP as well as JP2. The latter was a great deal of trouble, it appears that "the community" (notably Gatsby and Contentful) are very happy t…

> I bring this both to point out that there is a very valid reason to use WebP over JPEG — alpha blending — and that this entire field is still a gigantic mess. Yeah, you can do manual alpha masking in webkit, but it's freaky and stupid.

Full blending, or just masking? i.e. can alpha values take on the full range from 0-1, or are they limited to full on or full off?

Re: Is WebP really better than JPEG?

#133
post #35

As someone who hosts images on their site, what is the best software (preferably open source) one can use to compress JPEG images imported from a digital camera? I would be glad to serve only JPEGs and dispense with WebP versions and simplify my site html. A straightforward encoding of a JPEG into a WebP (using GIMP) does give me an almost 1/3rd reduction in file size, which is not insignificant.

Others have mentioned you're using 2 lossy formats. You would probably get a similar end file size with jpegoptim. Compile it with mozjpeg for even smaller sizes.

Not sure about his images, but WebP supports lossless compression. If they are coming from a camera, it seems reasonable that they might be lossless, depending on the camera settings.

[Update] Just noticed he's going JPEG->WebP so my comment makes no sense.

Re: Is WebP really better than JPEG?

#135

> Note that Mozilla somewhat walked back from this and implemented WebP support for Firefox in 2019 I wouldn't call the decision to support a format 6 years after first evaluating it a walk back, it's a concession that the format has been adopted by the industry. If the most popular browser supports WebP and sites are using it, it makes sense that you should support it.

WebP also supports animation, and is clearly more efficient than GIF.

Re: Is WebP really better than JPEG?

#136

I really want a better alpha-mask standard to emerge. PNG24 is attractive, but huge. PNG8/GIF works well, but is pretty limited. I don't think WebP is it, but we'll see what comes out of the scrum. I'll work with whatever that is, but I won't waste my time chasing will o' the wisp "standards."

Some time ago I experimented with a reduced color palette and dithering while keeping the fill alpha info. It reduced the file size a lot while keeping the alpha.

Re: Is WebP really better than JPEG?

#137

One of the biggest barriers against adoption of these newer formats is the lack of pure java implementations for use server side. The Java wrappers around a native binary are helpful, but for many projects not very useful and this hinders adoption. https://github.com/haraldk/TwelveMonkeys/issues?q=is%3Aissue...

Honestly, you'd benefit more from idiomatic bindings rather than a pure Java implementation. There are quite a few high quality Java libraries that wrap C/C++ code but maintain a nearly 1:1 API, which is what ends up making them difficult to work with. OpenCV is a good example of this.

Re: Is WebP really better than JPEG?

#138
My results with libvips have been way more encouraging than this post suggests with MozJPEG and the WebP reference encoder!

Here's a MEGA folder with my example files so you can compare for yourself. Sorry I know this host might be blocked in many places, but every image host I tried (imgur, postimg) recompressed my uploaded files negating the fairness of the test. If anyone has a suggestion for a better host I'm happy to re-upload.

https://mega.nz/folder/JsUXWIqI#xYIohBdiVKrGYTi-BeENEA

e: another host: http://www.filedropper.com/libvipswebpvsjpeg

My random sample is a black-and-white JPEG photograph vs its WebP equivalent. The results are in line with my results for many other images of different types, like other black-and-white photos, color photos, clean computer graphics, screenshots of UIs and media/games, etc etc. The original image for this test can be found here: https://en.wikipedia.org/wiki/Sand_Hill_Road

Both test images were output by libvips after loading the original JPEG. The libvips-generated JPEG is 1.22mb, smaller than the 1.26MB original, but the libvips-generated WebP is 944KB! I included two sceenshots of each libvips-generated version opened in a same-size window too, both much smaller than the full res. Tabbing between the two on my PC does not visibly change on screen at all.

I don't entirely enjoy WebP just because the software support is still spotty, but I haven't been able to argue with the compression benefits!

Re: Is WebP really better than JPEG?

#140

ASK HN: Since this discussion has come up, I would like to ask HN if you are interested for an in-depth comparison on a production workload. I run this https://www.gumlet.com which serves more than 50M images per day. We can put entire study on different image formats if HN finds it helpful. Please let us know.

Definitely interested-- a site with an image heavy workload such as yours is the perfect testbed for this sort of exploration.
Post reply on HN