It shouldn't.
We use Optimus to optimize the images and make webp versions.
The problem is that they weren't being served, but the script takes care of that.
But interesting question, I will investigate.
Thanks.
B
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
We throw this into htaccess for serving next gen images. You guys see any harm here? Thanks.
#SERVE NEXT GEN IMAGES
# Vary: Accept for all the requests to jpeg and png
SetEnvIf Request_URI ".(jpe?g|png)$" REQUEST_image
RewriteEngine On
# Check if browser supports WebP images
RewriteCond %{HTTP_ACCEPT} image/webp
# Check if WebP replacement image exists
RewriteCond %{DOCUMENT_ROOT}/$1.webp -f
# Serve WebP image instead
RewriteRule (.+).(jpe?g|png)$ $1.webp [T=image/webp]
Header append Vary Accept env=REQUEST_image
AddType image/webp .webp
END OF SERVE NEXT GEN IMAGES
Interesting, haven't seen this in use before.
But won't this just change the extension of the file? It won't actually serve an optimized webP image?
It shouldn't.
We use Optimus to optimize the images and make webp versions.
The problem is that they weren't being served, but the script takes care of that.
But interesting question, I will investigate.
Thanks.
B