The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

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

  1. kReEsTaL
    Posted 3 years ago #


    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.


    <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



  2. natostanco
    Posted 3 years 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
    Plugin Author

    Posted 3 years 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
    Posted 3 years 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
    Plugin Author

    Posted 3 years 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

  • BJ Lazy Load
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic