Wordpress LScache Plugin: Webp for amp and wpforo
Last Updated on: Wed, 15 Apr 2026 00:00:02 Hi, I just discover Littlespeed cache, and the possibility to do webp image with. It work well for articles, image are converted on webp, but it dont work for AMP with AMP for WP plugin and for WPforo image. Do you have solution for make webp with this 2 plugins? Thanks! Hi @pierreto, thanks for reporting. Currently, our plugin does not replace the AMP pages image to WEBP format. You can change the following code to make it happen: 1) litespeed-cache/inc/media.class.php:397 Change if ( ! defined( LITESPEED_IS_HTML ) ) to if ( ! defined( LITESPEED_IS_HTML ) && ! defined( IS_AMP_ENDPOINT ) ) 2) litespeed-cache/thirdparty/lscwp-3rd-amp-bypass.cls.php:29 Add 2 row at the start of pre_load() function: if ( ! isset( $_GET[ amp ] ) ) return define( IS_AMP_ENDPOINT, true ) 3) Go to LiteSpeed Cache Setting > Media Add amp-img.src to WebP Attribute To Replace You can check on this commit for the details or install this version diretly (Remember to export the setting before reinstallation).
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference