4 ms·
Importantly, the webp format supports animation, and is considerably more efficient than animated gif. [1] [1] http://res.cloudinary.com/demo/image/upload/fl_a
by shakethemonkey 10y ago
Importantly, the webp format supports animation, and is considerably more efficient than animated gif. [1]
[1] http://res.cloudinary.com/demo/image/upload/fl_awebp/cell_animation.webp http://res.cloudinary.com/demo/image/upload/fl_awebp/cell_an...
- bzbarsky 10y agoYes, but is it as efficient as WebM? The concept of creating animated images out of the index frame format of a video codec is pretty amusing to me. Just use the video codec if you want video.
- shakethemonkey 10y agoThis 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.