WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Not loading particular images? Please help

[Resolved] Not loading particular images? Please help

  • 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)

    Thanks!

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • I fixed it.

    I simply added another preg_match to find a specific word.

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

    PUT:
    if (preg_match(“/ignored/i”, $imgHTML)) {} else {

    AND THEN ADD A } AFTER

    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.

    Plugin Author Bjørn Johansen
    Participant

    @bjornjohansen

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Not loading particular images? Please help’ is closed to new replies.