• Resolved someshrai

    (@someshrai)


    I enabled Lazy load on my blog page and all blog pages have same structure. The thing with lazy load is that it is also affecting my logo and the featured image on the blog page.
    I tried excluding the logo and featured image by specifying their classes in the plugin under ‘Lazy Load Image Class Name Excludes’ but still, it just doesn’t work. It still is lazyloading the logo and the featured image.

    Report number: ZTNNMAAE

    I dont see the option here to attach screenshot so i am writing here exactly how i wrote the class names in the Class Name Exclude section::

    .et_pb_menu__logo
    .featured-image-class

    THose two are my classes for logo and featured image.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi @someshrai, the exclude class section need to put the class name on that element <img>, parent element will not work. In your case please put the img url directly on Lazy Load Image Excludes > wp-content/uploads/2020/01/TIB-logo-Black-3-1.png and wp-content/uploads/2020/01/tbilisi-header.jpg.

    Thread Starter someshrai

    (@someshrai)

    But doesn’t that mean i will have to repeat this action on every blog post i make? Every time i make a blog post i will have to remember to put the Featured image URL in Emage Excludes.. Is there any way to make those featured images exclude from lazy load automatically?

    Yes in the current version, you need to use the image class or path to exclude it from lazyload. Or using element attribute and filter for exclusion.

    May I know the reason why you want to exclude that two image from lazyload?

    Thread Starter someshrai

    (@someshrai)

    As you said i can use the image class, i want to know how to know the class for those images and how exactly to exclude them. i want to put the class so that i dont have do it manually again and again.

    I am trying to exclude it because when anyone loads the page i dont want the logo and featured image to lazy load. when you open the page there is no logo for a while if lazy load is on. and the thing is that my featured image also comes just at the initial view port of the page.

    If you want to exclude by class firstly you need to have a class on the <img> element, but I’ve checked on your site it does not contain any.

    For the logo, you can use Lazy Load Image Excludes by URI.

    For the feature images, you can add some string on the filename, for example: abc-myescapestring.jpg, then you can use the same method, Lazy Load Image Excludeswithmyescapestring` string for excluding this images.

    Some theme editor can assign a class to an Element, you can try to contact the editor’s author for the details. If yes, it will be more easy to exclude it from lazyload.

    Thread Starter someshrai

    (@someshrai)

    Thank you, i guess that’s a good idea to add an string to the images i want to exclude.

    But yes, my theme editor lets me assign a class to an Element. can you let me know how to write class name in the exclude box? is there a particular format to write it? i was writing the class name starting with a (.)

    and actually if you inspect the feature image on the page you can see it has class specified as ‘featured-image-class’

    Just checked again and found the class name. But the class name is on parent element <div> but not on <img>. Please try to contact the editor’s author to see is there any method for adding a class on <img>.

    Otherwise, you only can use file name for exclusion.

    Thread Starter someshrai

    (@someshrai)

    Thank you so much for your time and for being really helpful. I decided to put image Urls in exclude section for the time being. I will be writing to Divi team asking them how to add class to .
    Have a good one!

    Your welcome 😉 Please feel free to let us know if need any follow up for their reply.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Having problem excluding particular class from lazyloading’ is closed to new replies.