4 ms·
This becomes a complicated discussion. In an img tag, a webp can degrade to gif, but that is not true of webm, which is not an image. And webp uses considerably
by shakethemonkey 10y ago
This becomes a complicated discussion. In an img tag, a webp can degrade to gif, but that is not true of webm, which is not an image. And webp uses considerably less resources than webm.
It's probably also an easier sell to the more problematic browsers (you know who they are) to support webp than webm.
- bzbarsky 10y agoBy degrade in an img tag you mean if the server does sniffing or content negotiation to send gif instead of webp? > It's probably also an easier sell to the more problematic browsers The only browser I can think of that does not support webm already but might conceivably add support for webp is Safari. Chrome, Firefox and Edge all support webm, and I don't see IE or Opera Mini adding webp support, since neither one is really in active development. Maybe you're right that Safari is more likely to support webp than webm. It's hard to say.
- j4_james 10y agoFWIW, you can do content negotiation on the client side with the HTML5 picture element: http://www.html5rocks.com/en/tutorials/responsive/picture-element/#toc-file-type http://www.html5rocks.com/en/tutorials/responsive/picture-el... If a browser doesn't support that, it's probably not going to support the image format you're trying to negotiate anyway. In that case it's just going to fall back to the enclosed default img which is exactly what you'd want.