BJ Lazy Load
[resolved] Not loading particular images? Please help (3 posts)

  1. capbell
    Posted 3 years ago #

    Hey there,

    Excellent plugin, but I am having trouble with it.

    I have a hover effect on images that when you hover over it, two small other images appear on top of the image (go to shopping cart and zoom image). However, when I put my mouse on an image, the 2 small images do appear on top but as the BJ placeholder, and then after a random while (30 seconds - a few minutes) they appear? They are only 8kbs each and the page loads everything completely, so I do not understand why these images don't appear quickly.

    Can you tell me why this is?

    Ideally I could give the images a specific class name that makes the BJ lazy load plugin ignore them and not make them lazy load (they are important small images - BJ lazy load is not needed)



  2. capbell
    Posted 3 years ago #

    I fixed it.

    I simply added another preg_match to find a specific word.

    foreach ( $matches[0] as $imgHTML ) {

    if (preg_match("/ignored/i", $imgHTML)) {} else {


    array_push( $replace, $replaceHTML );

    What this all does is checks each image url for the word "ignored" and then does nothing if found, and does the usual lazy load stuff if it isn't found. Simply add the word "ignored" to the class of the image html in the HTML editor of your post so it looks something like Class="whateverclassyoualreadyhave ignored"

    Good luck.

  3. Bjørn Johansen
    Plugin Author

    Posted 3 years ago #

    Thank you for your feedback.

    I just released version 0.5.4 which lets you define the classes of specific images that you want to skip.

    In your case, you would put "ignored" in the "Skip images with classes" options field in the admin panel.

    Hope this fixes your issue on a permanent basis.

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


No tags yet.