Jump to content

Recommended Posts

Posted
On 2/16/2023 at 11:19 PM, OHP22 said:

but our htaccess doesnt rewrite the url from png,jpg to webp?

With method 2 htaccess should rewrite it from webp to jpg shouldn't it?

Assuming that is what you're expecting it to do, I found the example htaccess code didn't work for me. But I found that the code below did work (of course YMMV).

RewriteCond %{HTTP_ACCEPT} !image/webp
RewriteRule (.+)\.webp$ $1.jpg [T=image/jpeg,E=REQUEST_image]

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...