3 ms·
Finally! A lossy transparent format, supported by a browser that a large % of people use! Does anyone know a good way to provide webp with a fallback, short of
by richbradshaw 15y ago
Finally! A lossy transparent format, supported by a browser that a large % of people use!
Does anyone know a good way to provide webp with a fallback, short of sniffing the UA? I've tried using mod_negotiation (http://httpd.apache.org/docs/2.0/mod/mod_negotiation.html http://httpd.apache.org/docs/2.0/mod/mod_negotiation.html), but Chrome doesn't sent the webp mime type, so I can't get it to work...
Anyone know of a solution?
- icebraining 15y agoWell, you could use Javascript: try to load a 1x1 WebP file using Image() and then choose the right URL for the images on the page depending on the result. Add normal <img> tags inside <noscript> with the PNG/JPG versions for graceful degradation. http://stackoverflow.com/questions/5573096/detecting-webp-support http://stackoverflow.com/questions/5573096/detecting-webp-su...
- comex 15y agoAt a guess, file a bug against Chrome?
- maggit 15y agoThis is what the Accept-header is for, but unfortunately browsers do not really give helpful values in this header. I've also heard from people working with web browsers that the Accept-header wouldn't work well for the real web anyway. Sigh. :(