WordPress.org

Ready to get started?Download WordPress

Forums

BJ Lazy Load
[resolved] Add HTML lazy classes to existing node classes (5 posts)

  1. kReEsTaL
    Member
    Posted 1 year ago #

    Hi!

    In the generated HTML, there's a problem caused by the plugin.

    If the image which is lazy loaded already has some HTML classes, BJ Lazy Load won't add its own classes to them, but will duplicate the class element.

    I.e.:

    <img class="lazy lazy-hidden" class="avatar tiny" alt="" src="http://url.com/wp-content/plugins/bj-lazy-load/img/placeholder.gif" data-lazy-type="image" data-lazy-src="http://url.com/img.jpg" />
    <noscript><img alt="" src="http://url.com/img.jpg" class="avatar tiny" /></noscript>

    Ideally, you'd want BJ Lazy Load's own classes to be added to the existing classes. This would resolve many HTML validation errors and be more logical :)

    Thanks in advance for your help!

    Best xx

    Marie

    http://wordpress.org/extend/plugins/bj-lazy-load/

  2. natostanco
    Member
    Posted 1 year ago #

    I have somekind of an opposite problem, basically enabling bj lazy loading removes all the custom classes the images have and leave only the lazy load classes!

  3. Bjørn Johansen
    Member
    Plugin Author

    Posted 1 year ago #

    Terribly sorry I didn't see this post until now. BJ Lazy Load should indeed add its classes to the existing ones – at least it used to, so it must have broke at some point. I will investigate this and see what I can find.

  4. kReEsTaL
    Member
    Posted 1 year ago #

    Any idea about the problem, Bjørn? It's blocking a major release of mine, and I'm definitely willing to donate if you can fix the problem soon. Many thanks in advance! :)

  5. Bjørn Johansen
    Member
    Plugin Author

    Posted 11 months ago #

    Sorry it took so long. Have been super busy.

    Just released version 0.6.9 where this should be fixed now.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic