Ask HN: Should I use WebP and stop providing PNG and JPEG?

7 points by raphaelj ↗ HN
Hi,

Based on [1], it seems like at least 95% of web users support WebP as an image format.

Is it time to drop support for legacy image formats (PNG, JPEG), or should I still provide them as alternatives (using <source>)?

--

[1] https://caniuse.com/webp

9 comments

[ 2.7 ms ] story [ 37.6 ms ] thread
It depends. If it’s a technical blog you could, if it’s an online shop, don’t.
Keep them. It might be worthwhile to look into AVIF instead of WebP, as AVIF seems to be winning the current generation image format war.
accepts header can be used to optimize here. If client supports webp or afiv - send those. If they don’t - png/jpg
I provide both. Webp by default, and the original format for others. Like duffyjp, I maintain support for iOS 12. I don't find it reasonable for images or text not to load on those devices.
I’ve noticed that LinkedIn doesn’t support webp as the card image, so I have temporarily reverted to jpgs for those in my podcast site.
Does dropping PNG/JPG provide you some really significant benefits?

If no, then why?

As much as I love the idea of WebP, it hardly seems like it's going to replace jpg, png, or gif in full swing. WebP is great to ensure your image is optimized to the fullest, but I'm not sure too many people really care about the few extra KB a JPG might have. The only time it may matter is when you have a GIF and WebP can reduce it by several MB.