• Resolved Victor Rusu

    (@vicrus)


    Hi! Why is this plugin not adding the <noscript> tag to background images or how can I make it add it in the free version? Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Dimitris – WPMU DEV Support

    (@wpmudev-support6)

    Hello @vicrus

    The Lazy Load module will handle images added via the “img” tag, and in addition to that, it will handle any “background-image” that is added in the element’s style=””. It will not work for background images used in external CSS files.

    Examples:

    This will work:
    <img src="imagepath/image.jpg" />
    or
    <div style="background-image: url(imagepath/image.jpg);">Something</div>
    or

    <div class="my-class">Something</div>
    <style>.my-class { background-image: url(imagepath/image.jpg); }</style>

    This won’t work:
    <div class="my-class">Something</div>
    In a .css file
    .my-class { background-image: url(imagepath/image.jpg); }

    Hope that clarifies things better!
    Thank you,
    Dimitris

    atimez

    (@atimez)

    <div class=”has-background” style=”
    background: url(‘https://shangpalace.thenorfolkgroup.com/wp-content/uploads/2019/10/Shang-Palace-Review-Bg_low.jpg&#8217;) no-repeat left top;
    background-size: cover;
    background-attachment: fixed;padding-top:30px;padding-bottom:30px;” id=”guests_reviews”>

    My above inline css does not work with lazyload. Could you please have a look at this?

    @atimez,

    This will be fixed in the upcoming 3.4 update.

    Best regards,
    Anton

    Just to confirm, i’m having same problem. Background images not getting lazy loaded.

    <div class="featured-background-image-right" style="background-image: url(https://woocommerce-247181-772080.cloudwaysapps.com/wp-content/uploads/2018/04/Springcph_E.ST_.N_Spaltekanden_041_web.jpg); height: 500px;"></div>

    Sorry, my above statement was not correct. I confused this request with another thread. The 3.4.0 update will fix CDN links for background images. Lazy loading will ONLY work for img tags.

    Best regards,
    Anton

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Background Images’ is closed to new replies.