Mine is also not working, can you look at let me know if I am doing it right?
I have added the exception code at the end of the JPG files I do not wish to convert in my Banners Folder.
src=”/wp-content/uploads/2019/03/TomandBunny-SQ.jpg?original”
This is what my .htaccess file looks like, is this correct?
# BEGIN WebP Express
# The rules below are a result of the WebP Express options, WordPress configuration and the following .htaccess capability tests:
# – mod_header working?: could not be determined
# – pass variable from .htaccess to script through header working?: no
# – pass variable from .htaccess to script through environment variable working?: could not be determined
RewriteCond %{QUERY_STRING} original
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule . – [L]
<IfModule mod_rewrite.c>
RewriteEngine On
# Redirect to existing converted image in cache-dir (if browser supports webp)
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{DOCUMENT_ROOT}/wp-content/webp-express/webp-images/doc-root/wp-content/$1.$2.webp -f
RewriteRule ^/?(.+)\.(jpe?g|png)$ /wp-content/webp-express/webp-images/doc-root/wp-content/$1.$2.webp [NC,T=image/webp,E=EXISTING:1,L]
# Make sure that browsers which does not support webp also gets the Vary:Accept header
# when requesting images that would be redirected to existing webp on browsers that does.
<IfModule mod_setenvif.c>
SetEnvIf Request_URI “\.(jpe?g|png)$” ADDVARY
</IfModule>
# WebP Realizer: Redirect non-existing webp images to webp-realizer.php, which will locate corresponding jpg/png, convert it, and deliver the webp (if possible)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?(.+)\.(webp)$ /wp-content/plugins/webp-express/wod/webp-realizer.php?xdestination-rel=xwp-content/$1.$2&wp-content=wp-content [E=DESTINATIONREL:wp-content/$0,E=WPCONTENT:wp-content,NC,L]
# Redirect images to webp-on-demand.php (if browser supports webp)
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{QUERY_STRING} (.*)
RewriteRule ^/?(.+)\.(jpe?g|png)$ /wp-content/plugins/webp-express/wod/webp-on-demand.php?xsource-rel=xwp-content/$1.$2&wp-content=wp-content&%1 [E=REQFN:%{REQUEST_FILENAME},E=WPCONTENT:wp-content,NC,L]
<IfModule mod_headers.c>
<IfModule mod_setenvif.c>
# Apache appends “REDIRECT_” in front of the environment variables defined in mod_rewrite, but LiteSpeed does not.
# So, the next lines are for Apache, in order to set environment variables without “REDIRECT_”
SetEnvIf REDIRECT_EXISTING 1 EXISTING=1
SetEnvIf REDIRECT_ADDVARY 1 ADDVARY=1
# Set Vary:Accept header for the image types handled by WebP Express.
# The purpose is to make proxies and CDNs aware that the response varies with the Accept header.
Header append “Vary” “Accept” env=ADDVARY
# Set X-WebP-Express header for diagnose purposes
Header set “X-WebP-Express” “Redirected directly to existing webp” env=EXISTING
</IfModule>
</IfModule>
</IfModule>
<IfModule mod_mime.c>
AddType image/webp .webp
</IfModule>
# END WebP Express