• Resolved Shkic

    (@shkic)


    First of all I must say that Smush has one of the best lazy load I’ve ever seen.

    But now I trying manually add lazy load to one image on website, but lazy load on this one image not working.

    I’m trying to lazy load this image:

    <a href="/donate/"><img src="/stuff/btn_donateCC_LG.gif" alt="Donate"></a>

    Changed to this:

    <a href="/donate/"><img src="/stuff/btn_donateCC_LG.gif" alt="Donate" data-sizes="auto" class="lazyautosizes lazyloaded"></a>

    But image not lazy loading. What I’m doing wrong?

    Thank you for great plugin!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @shkic,

    It should actually be something like this:
    <a href="/donate/"><img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-src="/stuff/btn_donateCC_LG.gif" alt="Donate" data-sizes="auto" class="lazyautosizes lazyloaded"></a>
    You can exchange the weird decoded image with any blank image that you have. For example, a 1x1px gif file

    Best regards,
    Anton

    Thread Starter Shkic

    (@shkic)

    Strange, because still image not lazy loading. When I changed the code, loads only 1×1 pixel blank image, but not “btn_donateCC_LG.gif”. Meanwhile every other image on website which is lazy loaded with plugin, not manually, works normal.

    No errors in console.

    @shkic,

    The only other reasons it could be failing, is because it is located in a place that Smush is not checking. At the moment, lazy loading will work on the_content filter, post thumbnails, avatars and widgets. If the image is not in one of these places, Smush might not see it.

    Best regards,
    Anton

    Plugin Support Dimitris – WPMU DEV Support

    (@wpmudev-support6)

    Hello @shkic

    It’s been a while since we’ve heard back from you so I’m marking this topic as resolved. Feel free to post back any updates and we can re-open it and carry on troubleshooting. 🙂

    Thank you,
    Dimitris

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

The topic ‘Manually add lazyload’ is closed to new replies.