Lazy Load Not Working
-
Hello! Great plugin. I tried enabling LiteSpeed’s lazy loading today, but I haven’t seen evidence of it showing up on my site (I don’t see any data-lazyloaded=”1″ in devtools).
I tried all of the troubleshooting ‘read this first’ steps before writing this.
First I made sure to scrub the default WP lazy loading everywhere I could. I still see it (loading=”lazy”) in my related posts, but otherwise it is all gone. Here’s the code I used to remove the default WP loading=”lazy”:
if (!defined('ABSPATH')) die(); add_filter('wp_lazy_loading_enabled', '__return_false'); function disable_lazy_load_featured_images($attr, $attachment = null) { $attr['loading'] = 'false'; //This used to be eager but I changed it to false to remove the loading attribute entirely return $attr; } add_filter('wp_get_attachment_image_attributes', 'disable_lazy_load_featured_images');
I have lazy loading enabled in LiteSpeed’s settings, but still don’t see data-lazyloaded=”1″ anywhere in my site. (I also added a CSS animation for fading in the LiteSpeed lazy load, which currently isn’t doing anything because there’s nothing on the site with a data-lazyloaded attribute.)
Any advice is appreciated!
Report number: XNQVAPNM
Thank you very much for all your help! ??
The page I need help with: [log in to see the link]
- The topic ‘Lazy Load Not Working’ is closed to new replies.