Using mod_negotiation to serve webp if the UA requests it.
Posted
by
Rich Bradshaw
on Stack Overflow
See other posts from Stack Overflow
or by Rich Bradshaw
Published on 2011-05-15T18:12:32Z
Indexed on
2011/06/24
0:22 UTC
Read the original article
Hit count: 153
apache
|mod-negotiation
Is it possible to use mod_negotiation to serve up a webp image if the browser supports it, and a jpg otherwise?
For instance, if I link to an image with the path /images/test, it serves the image found at /images/test.webp if the UA knows about webp, or jpg otherwise?
I've tried poking around, but it seems that the Accept headers in Chrome at least look like Accept:*/*
, rather than specifying the image type.
If this isn't the way to do it, has anyone got any other suggestions?
© Stack Overflow or respective owner