This is an old revision of the document!


Although there is a feature to exclude individual images from lazy load , but when there are hundreds images to be excluded , this is not optimal solution , therefore , we can also exclude by class name.

Check the source code to find the class name

Access the page by browser , and view the source code.

This image comes with data-lazyloaded=“1” which means it is lazy loaded.

In case you have LSCWP optimization feature , like HTML minify enabled , you can use /?LSCWP_CTRL=before_optm query to bypass LSCWP , e.g. https://www.your_domain.com/?LSCWP_CTRL=before_optm to make it easier to read.

There are 3 class names , wp-block-gallery columns-1 is-cropped , blocks-gallery-item and wp-image-46

but only the wp-image-46 is inside between <img and />, so this is the one we need.

Now add this class name into Exclude box

Save and purge all.

Check the source again , this image has been excluded from lazy load, and other images are still being lazy loaded.

If after adding class into exclude but image still being lazy loaded:

1. Check the source code again and see if it was the right class

2. Check if the page is cached , and if so , please do a purge.

3. Check the Debug Log , you should see log as follow:

06/27/19 15:19:26.429 [123.123.123.123:54011 1 GLN] [Media] lazyload found: https://test.litespeed.dev/wp-content/uploads/2019/06/wordpress.png
06/27/19 15:19:26.429 [123.123.123.123:54011 1 GLN] [Media] lazyload image cls excludes [hit] wp-image-46
06/27/19 15:19:26.429 [123.123.123.123:54011 1 GLN] [Media] lazyload found: https://test.litespeed.dev/wp-content/uploads/2019/06/wordpress2.png

If it not showing up , most likely you may have used wrong name.

  • Admin
  • Last modified: 2019/06/27 15:24
  • by qtwrk