19 ms·
For web graphics, isn't a mix of PNG/JPEG good enough generally speaking? I'd imagine the benefits of changing to something more modern/efficient aren't worth
by emeril 4y ago
For web graphics, isn't a mix of PNG/JPEG good enough generally speaking?
I'd imagine the benefits of changing to something more modern/efficient aren't worth the cost/time involved other than in esoteric situations given that most end users have high bandwidth connections and bandwidth costs typically aren't too significant?
- pineconewarrior 4y agowebp, webp2, and avif are absolutely worth using in modern web scenarios. It's even considered "poor practice" to serve legacy formats now.
- alx__ 4y agoI wouldn't say it's "poor practice" to serve legacy formats. If you're using a setup to allow for fallbacks, that's the best practice. There are more device types some developers need to consider than the latest version of Chrome.
- pineconewarrior 4y agoThat's why I put it in the quotes. Google will flag you for core web vitals issues if you're serving jpegs and pngs all over the place. Many CDNs automatically serve the best format compatible with the useragent these days! Also... the bit about the latest version of Chrome is pretty far off. WebP has been usable for 90+% (for my use cases, 99%) of the web for a LONG time. The only thing holding us back was safari 14.0 which is now not on my list of targets!
- cpncrunch 4y agoYou might want to check your pagespeed insights to verify that. I noticed that our pagespeed score was very poor (due to google using new methods to calculate those scores). Adding webp versions of images reduced the size of those images significantly, and brought our pagespeed scores back to more reasonable values in google's eyes.
- chrismorgan 4y agoIt’s unlikely that WebP was what helped there, but rather more lossy encoding (presuming it was JPEGs you were replacing). Yes, WebP is smaller for a given perception quality level, but it’s typically not that much smaller; you could have achieved results almost as good by reencoding to the same perception quality as you used on the WebPs but still as JPEGs.
- zuzun 4y agoJPEG doesn't support transparency.
- chrismorgan 4y agoYeah, images where lossy compression is fine but an alpha channel is needed are the one situation where switching to WebP (or AVIF, and soon JPEG XL) makes sense.
- cpncrunch 4y agoOne lossless png (a screenshot) was converted to (default web quality, which is lossy) webp, and visually it was identical. Original png was 151k, webp was 23k. Converting it to a jpg results in a size of 66k (equivalent quality to the webp). So in this case webp was a third of the size of a jpg. Typically, webp will be about 30-50% smaller than an equivalent jpg, which is a pretty significant amount.
- npteljes 4y agoI'd say if you want to go on with your day painlessly, they are solid choices. If the website has large traffic for static assets, webp could make sense - the files that would be otherwise jpegs could be half the size, so half bandwidth. I imagine that CDNs would do this for you though.