Title: Problem lazy loading images on different posts
Last modified: January 30, 2022

---

# Problem lazy loading images on different posts

 *  Resolved [Equipe GameGratis](https://wordpress.org/support/users/gamegratis/)
 * (@gamegratis)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-lazy-loading-images-on-different-posts/)
 * Hello! First thank you, its a great plugin.
 * I tried to exclude lazy loading from woocommerce single produt image by adding
   the class “wp-post-image” on the “Lazy Load Image Class Name Excludes” section,
   because its above the fold.
    But it does not work, the ‘loading=”lazy”‘ keeps
   appearing on the  tag. I purged cache and also from Cloudfare’s. Also I searched
   for any other plugin that might be lazy loading and causing conflicts, but there
   isnt.
 * Link for a example page:
    [https://www.gamegratistm.com/promocao/assassins-creed-valhalla-ps4/](https://www.gamegratistm.com/promocao/assassins-creed-valhalla-ps4/)
 * On another hand I have the opposite problem with the normal blog “post” type.
   The first image never lazy loads on blog posts, I dont know why.
 * Link for a example page:
    [https://www.gamegratistm.com/post/xbox-compra-activision-blizzard/](https://www.gamegratistm.com/post/xbox-compra-activision-blizzard/)
 * Please help the way you can.
    Thank you in advance!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fproblem-lazy-loading-images-on-different-posts%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 11 replies - 1 through 11 (of 11 total)

 *  [serpentdriver](https://wordpress.org/support/users/serpentdriver/)
 * (@serpentdriver)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-lazy-loading-images-on-different-posts/#post-15307186)
 * loading=”lazy” is wordpress’s own lazy attribute , not added by LiteSpeed Cache
   plugin
 * Get more info:
    [https://wordpress.org/support/topic/exclude-images-from-lazy-load-dont-work/](https://wordpress.org/support/topic/exclude-images-from-lazy-load-dont-work/)
 *  Thread Starter [Equipe GameGratis](https://wordpress.org/support/users/gamegratis/)
 * (@gamegratis)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-lazy-loading-images-on-different-posts/#post-15307291)
 * Thank you!! And sorry about that haha
 * Now I added add_filter( ‘wp_lazy_loading_enabled’, ‘__return_false’ ); to functions.
   php
 * After purge ls and Clodufare, ‘loading=”lazy”‘ disappeared from the product image,
   but still appears on some images and ls cache lazy loading not working:
 * [https://www.gamegratistm.com/](https://www.gamegratistm.com/)
    [https://www.gamegratistm.com/promocao/assassins-creed-valhalla-ps4/](https://www.gamegratistm.com/promocao/assassins-creed-valhalla-ps4/)
 * Do you know why?
    -  This reply was modified 4 years, 3 months ago by [Equipe GameGratis](https://wordpress.org/support/users/gamegratis/).
    -  This reply was modified 4 years, 3 months ago by [Equipe GameGratis](https://wordpress.org/support/users/gamegratis/).
 *  [serpentdriver](https://wordpress.org/support/users/serpentdriver/)
 * (@serpentdriver)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-lazy-loading-images-on-different-posts/#post-15307373)
 * Independently from issue you described, you are using LScache plugin for WP and
   Cloudflare cache. Both do the same, but to double cache functions does not double
   the speed. You can’t only use 1 cache at the same time. In case you disable Cloudflare
   cache also disable LScache temporary. If done check lazy function again.
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-lazy-loading-images-on-different-posts/#post-15307730)
 * please provide the report number , you can get it in toolbox -> report -> click“
   send to LiteSpeed”
 * and which images in that page supposed to be lazyloaded ?
 *  Thread Starter [Equipe GameGratis](https://wordpress.org/support/users/gamegratis/)
 * (@gamegratis)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-lazy-loading-images-on-different-posts/#post-15308490)
 * [@serpentdriver](https://wordpress.org/support/users/serpentdriver/) I am not
   sure if I understood. LS Cache Plugin is connected to Cloudfare on CDNs tab. 
   Should I stop using LiteSpeed plugin? Or disable LS cache function?
 * I turned on Cloudfare’s development mode and turned OFF LS cache on “Enable Cache”
   option. Still is not lazy loading via LS Plugin, and “loading=lazy” from WordPress
   continues on some images.
 * [@qtwrk](https://wordpress.org/support/users/qtwrk/) thank you for your help 
   also. The report number is: MCSPMKYW
 * > and which images in that page supposed to be lazyloaded ?
 * I removed all “exclude” options to make these tests. So it should be lazy loading
   all of them.
 * Edit: I tried different codes like `add_filter( 'wp_lazy_loading_enabled', '__return_false',
   999, 10 );` and it turns off lazy loading for almost every image. But there are
   some that still triggers Wp Default Lazy Load function. I dont know why. (if 
   you search for “lazy” in chrome inspection, you will find the images)
 * This remaining images using WP Lazy Load must be the cause for LiteSpeed’s Lazy
   Load not working at all.
    -  This reply was modified 4 years, 3 months ago by [Equipe GameGratis](https://wordpress.org/support/users/gamegratis/).
    -  This reply was modified 4 years, 3 months ago by [Equipe GameGratis](https://wordpress.org/support/users/gamegratis/).
 *  Thread Starter [Equipe GameGratis](https://wordpress.org/support/users/gamegratis/)
 * (@gamegratis)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-lazy-loading-images-on-different-posts/#post-15308830)
 * More information:
 * 1- My theme’s lazy load function is disabled.
 * 2- When I turn `add_filter( 'wp_lazy_loading_enabled', '__return_false' );` to
   TRUE, it apply Lazy Load to all images succesfully. But I need the option to 
   exclude some, thats why I am trying to use LiteSpeed Cache Plugin.
 * 3- I am also using Asset CleanUp Pro plugin, but he doesnt have a Lazy Load function
   and all other resources are disabled. I just use it to disable css and js scripts
   per page.
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-lazy-loading-images-on-different-posts/#post-15313292)
 * I don’t see any immediate error for why not lazyload
 * please try the [debug log](https://www.youtube.com/watch?v=oGuk85gwQc8&t=2s&ab_channel=LiteSpeedTechnologies)
 * it should provide more information
 *  Thread Starter [Equipe GameGratis](https://wordpress.org/support/users/gamegratis/)
 * (@gamegratis)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-lazy-loading-images-on-different-posts/#post-15318384)
 * So I tried the debug as shown in the video, this is the first lines:
 *     ```
       02/02/22 04:49:38.978 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] 💓 ------GET HTTP/1.1 (HTTPS) /
       02/02/22 04:49:38.978 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] Query String:
       02/02/22 04:49:38.978 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36
       02/02/22 04:49:38.978 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
       02/02/22 04:49:38.978 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] Accept Encoding: gzip
       02/02/22 04:49:38.978 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] X-LSCACHE: true
       02/02/22 04:49:38.978 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] LSCACHE_VARY_VALUE: +webp
       02/02/22 04:49:39.331 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [Router] get_role:
       02/02/22 04:49:39.331 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [Media] init
       02/02/22 04:49:39.332 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [LQIP] init
       02/02/22 04:49:39.332 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [Optm] init
       02/02/22 04:49:39.333 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [CDN] init
       02/02/22 04:49:39.333 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] ⏰ Task init
       02/02/22 04:49:39.333 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [Router] LSCWP_CTRL bypassed empty
       02/02/22 04:49:39.334 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [GUI] init
       02/02/22 04:49:39.433 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] 💰 [Tag] Add --- HTTP.200
       02/02/22 04:49:39.434 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [Ctrl] X Cache_control init on
       ```
   
 * Next comes a lot of webp replacements like this:
 *     ```
       02/02/22 04:49:39.680 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [Media] webp replacing: https://www.gamegratistm.com/wp-content/uploads/2020/08/cropped-LogoSample_ByTailorBrands512512-e1607037387906.jpg
       02/02/22 04:49:39.680 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [Media] - replaced to: https://www.gamegratistm.com/wp-content/uploads/2020/08/cropped-LogoSample_ByTailorBrands512512-e1607037387906.jpg.webp
       ```
   
 * And it ends with this:
 *     ```
       02/02/22 04:49:40.683 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [Core] Footer hook called
       [02-Feb-2022 07:49:40 UTC] PHP Notice: Undefined index: hide_for_logged_in in /home/ggbrtest/public_html/wp-content/plugins/heateor-social-login/includes/class-heateor-social-login-widgets.php on line 84
       [02-Feb-2022 07:49:40 UTC] PHP Notice: Undefined index: hide_for_logged_in in /home/ggbrtest/public_html/wp-content/plugins/heateor-social-login/includes/class-heateor-social-login-widgets.php on line 84
       02/02/22 04:49:41.024 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [Core] Footer hook called
       02/02/22 04:49:41.076 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [Core] Footer check passed
       02/02/22 04:49:41.076 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [Ctrl] X Cache_control -> private ( Admin cfg Private Cached URI: / )
       02/02/22 04:49:41.076 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [Ctrl] X Cache_control off - Admin configured URI Do not cache: /
       02/02/22 04:49:41.076 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [Ctrl] X Cache_control -> no Cache => LiteSpeed\Control::set_nocache()@362 => LiteSpeed\Control->finalize()@655 => LiteSpeed\LSC->send_headers()@492 => WP_Hook->apply_filters(,ARRAY)@307 => WP_Hook->do_action(ARRAY)@331 =>
       /home/ggbrtest/public_html/wp-includes/load.php@474
       02/02/22 04:49:41.077 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [Router] get_role:
       02/02/22 04:49:41.077 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [Vary] role id: failed, guest
       02/02/22 04:49:41.077 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [Router] get_role:
       02/02/22 04:49:41.077 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [Router] get_role:
       02/02/22 04:49:41.077 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [Vary] no custimzed vary
       02/02/22 04:49:41.173 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [Core] Footer check passed
       02/02/22 04:49:41.174 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [Media] bypass: Not cacheable
       02/02/22 04:49:41.174 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] GUI bypassed by no counter
       02/02/22 04:49:41.174 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [Optm] bypass: Not cacheable
       02/02/22 04:49:41.174 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] End response
       ```
   
 * Other pages seems to have similar log.
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-lazy-loading-images-on-different-posts/#post-15320976)
 * in these 2 lines
 *     ```
       02/02/22 04:49:41.076 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [Ctrl] X Cache_control -> private ( Admin cfg Private Cached URI: / )
       02/02/22 04:49:41.076 [2804:7f0:bcc0:2685:f8d5:b3dc:9bca:7a77:34044 1 Zin] [Ctrl] X Cache_control off - Admin configured URI Do not cache: /
       ```
   
 * and then
 *     ```
       [Media] bypass: Not cacheable
       [Optm] bypass: Not cacheable
       ```
   
 * if you have set a URI not-to-cache ,it will also bypass the optimization , as
   certain optimization process could be resource/time consuming , so there is no
   point to run through optimization process everytime when page is accessed
 *  Thread Starter [Equipe GameGratis](https://wordpress.org/support/users/gamegratis/)
 * (@gamegratis)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-lazy-loading-images-on-different-posts/#post-15327075)
 * > if you have set a URI not-to-cache ,it will also bypass the optimization , 
   > as certain optimization process could be resource/time consuming , so there
   > is no point to run through optimization process everytime when page is accessed
 * I see. At this moment, cache and all the other settings of LiteSpeed Cache Plugin
   are disabled on my site. Basicly only Lazy load Images is enabled, but its not
   working.
 * I cant see any action from the plugin when enabling the resources. Replacing 
   images to .webp is the only thing that appears to be working normally. I don’t
   know why, maybe is Cloudfare that is doing some things in advance.
 * My server is compatible with LightSpeed. Can you shed me light on wheter is worthy
   to continue using LightSpeed with Cloudfare, or try something different?
    -  This reply was modified 4 years, 3 months ago by [Equipe GameGratis](https://wordpress.org/support/users/gamegratis/).
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-lazy-loading-images-on-different-posts/#post-15329547)
 * when you disable the cache for certain or all page , it’s pretty much all the
   optimization will be bypassed as well

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Problem lazy loading images on different posts’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

 * 11 replies
 * 3 participants
 * Last reply from: [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/problem-lazy-loading-images-on-different-posts/#post-15329547)
 * Status: resolved