Plugin Support
qtwrk
(@qtwrk)
Hi,
Could you please specify little bit more ? I just checked with Google AMP Validator but seems it is a valid AMP page.
Best regards,
thank!
I have already solved the problem myself.
disabled optimization for amp pages.
Litespeed cache » Tuning » url exclude » /?amp$
☺
Plugin Support
qtwrk
(@qtwrk)
Hi,
Yes, there was an issue that lazy load image/iframe and google font async code will be inserted into AMP page, that should be addressed in future release.
Best regards,
This should be a more robust way to disable Litespeed on AMP pages:
add_filter( 'litespeed_can_optm', function( $can ) {
if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) {
$can = false;
}
return $can;
} );
This is important because the ?amp in the URL is not always present or it can look different based on configuration.
Important: This code requires that litespeed_can_optm run at or after the wp action in WordPress.
-
This reply was modified 6 years, 4 months ago by
Weston Ruter.
This issue was resolved in latest version of Litespeed plugin. No extra code needed to add now.