Wordpress LScache Plugin: Cant seem to exclude images from lazy loading even though there above the fold
Last Updated on: Wed, 15 Apr 2026 00:00:02 I have tried to exclude images using all the available media exclude methods, but the images are not excluding they always keep their loading= lazy attribute As an example this image always has loading= lazy no matter what I do AnyCase_Pro_Interface.png What can I do? The page I need help with: https://anycaseapp.com What can I do? loading= lazy attribute is generated by WordPress or your theme. To remove it use search function. There are dozens of threads about the same topic and how to solve it. https://wordpress.org/search/lazy+load+intext%3A%22Plugin%3A+LiteSpeed+Cache%22/ From what I have been able to gather, putting this in the functions.php file should prevent loading= lazy from appearing add_filter( wp_lazy_loading_enabled, __return_false ) but it doesnt seem to have any effect when I include it. I would like lightspeed cash to control the behavior of lazy loading on the site, but in WordPress 5.9 LS excludes seems to be ignored for me I would like lightspeed cash to control the behavior of lazy loading on the site, but in WordPress 5.9 LS excludes seems to be ignored for me To do that WordPress own attribute for lazy loading must be removed first. If it doesnt work when you set this filter you must purge the cache. Ive purged the cash of the site, and cloud flare as well it does nothing The attribute still remains when using the first code. If I use this code instead of the other one it will remove loading= lazy Everywhere, but it will remove litespeed cache lazy loading as well, While Im trying to remove only the WordPress addition. function disable_template_image_lazy_loading( $default, $tag_name, $context ) if ( img === $tag_name && wp_get_attachment_image === $context ) return false return $default add_filter( wp_lazy_loading_enabled, disable_template_image_lazy_loading, 10, 3 ) I dont know why this filter doesnt work for you, but it may help to know, that there are different attributes for lazy loading. loading=lazy == WordPress attribute data-lazyloaded=1 == LiteSpeed attribute Well Im just gonna leave a solution for anybody who might be facing the same problem, I have ended up using a plug-in called Disable Lazy Load . The author claims its a one line plug-in, This plug-in only disables the lazy load implementation of WordPress. The way I see it its definitely a problem that should be addressed with lightspeed, lightspeed Shouldnt conflict with core functionality, if the lazy loading is chosen by the user to be handled by lightspeed it should supersede the native lazy loading functionality which is basic. At the current state the score functionality cancels any optimization done by Lightspeed lazy loading, Making the lightspeed lazy loading optimization useless since WP 5.5 even if its turned on.
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference