Wordpress LScache Plugin: WebP for background images?
Last Updated on: Wed, 15 Apr 2026 00:00:02 Hey there, Im using Oxygen builder, and I have background images set for some of my sections. The output is very regular: #mysection background-image: url(domain.com/image.jpg) However, even though I have webp versions of those images, and Image WebP Replacement set to On, theyre not getting replaced. Does LSCache support WebP images that are within CSS? Thanks! Hi, Sadly no , currently LSCWP only supports webp in HTML code You can add this rule into .htaccess RewriteCond % HTTP_ACCEPT image/webp RewriteCond % REQUEST_FILENAME .webp -f RewriteRule ^(. ).(jpg|jpeg|png|gif) $1.$2.webp [T=image/webp,L] to force it load webp if webp exists and browser supports the URI will remain unchanged, but under the hood it will be using webp format. and if you are using any CDN service, please do check if your CDN can properly vary the image Best regards,
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference