4 ms·
You can use the HTML5 <picture> element to add a fallback jpeg for all browsers that don't currently support Webp
by oliv__ 8y ago
You can use the HTML5 <picture> element to add a fallback jpeg for all browsers that don't currently support Webp
- mh-cx 8y agoEven better: you can let your image server check the accepted formats in the request header and send webp content transparently instead of jpg. Then you don't have to change your markup at all. Browser's don't really care about file extensions. https://github.com/uhop/grunt-tight-sprite/wiki/Recipe:-serve-WebP-with-nginx-conditionally https://github.com/uhop/grunt-tight-sprite/wiki/Recipe:-serv...
- oliv__ 8y agoOh. Thanks! I didn't know that was possible