Background images are big issue. Any clue how to deal with them as they are big part of my projects as well 🙁
Plugin Support
qtwrk
(@qtwrk)
Hi,
yes, it was never working with background image
basically , only images within <img ... tag will be replaced
there is some improvement in next release for background images
if you are not using any CDN service , you can add this rule into your .htaccess
RewriteCond %{HTTP_ACCEPT} "image/webp"
RewriteCond %{REQUEST_FILENAME}.webp -f
RewriteRule ^(.*).(jpg|jpeg|png|gif) $1.$2.webp [T=image/webp,L]
this will force to load webp when it exists and browser supports while URI remains unchanged, but format will be webp
Best regards,
Hi,
thanks for the reply.
We’ve put the rules into the htaccess, but unfortunately it’s still not working.
We are using LSC on many other websites hosted in the same or a similar hosting environment. It’s working well on all other pages excapt this one.
Maybe you can further inspect this and help us to fix this.
Regards,
Sebastian`
Plugin Support
qtwrk
(@qtwrk)
Hi,
Is that rule still there ?
what’s your server env ?
Best regards,
Hi,
yes, the rule is still there.
What do you want to know about the server env?
Apache/Litespeed Webserver
PHP 7.3
…
Regards,
Sebastian
Plugin Support
qtwrk
(@qtwrk)
Hi,
I see you are running Plesk
if I recall correctly , by default Plesk has nginx in front to serve static ?
please verify if you have nginx running
Best regards,
Hi,
we’re not runnig nginx on this server.
Regards,
Sebastian
Plugin Support
qtwrk
(@qtwrk)
Hi,
please provide the report nunmber , you can get it in toolbox -> report -> click “send to LiteSpeed”
and also make sure you put this rule at top of your htaccess
also try replace ,L] to ,END]
Best regards,
Hi,
we changed the position and made the changes to the code but images still don’t appear as .webp.
View post on imgur.com
Report number: SHPAAFNX
Report date: 04/07/2021 11:42:48
Regards,
Sebastian
Plugin Support
qtwrk
(@qtwrk)
Hi,
it worked

I have already mentioned that :
this will force to load webp when it exists and browser supports while URI remains unchanged, but format will be webp
Best regards,