• Resolved jsndvn

    (@jsndvn)


    Hi

    First off, thanks very much for the plugin, it works very well for my needs so far and seems to be compatible with the latest API changes on Instagram.

    However, I can’t seem to find a way to lazyload the images fetched by the plugin. Basically using this method:

    $(document).ready(function() {
      $('.instagallery-image').addClass('lazyload')
    });
    

    The class isn’t applied to the image elements. If I change the target to the widget itself, it gets applied and processed by the lazyload script I’m using.

    Is there some method I can use that you’re aware of?

    Thanks!

    • This topic was modified 6 years, 3 months ago by jsndvn.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jsndvn

    (@jsndvn)

    Just an update having explored the plugin code some more. I made a copy of gallery.php and included it in my theme folder, from where I was able to add the lazyload class directly to the image elements as they appear in the widget. It’s still not working as the images are still fetched on page load as opposed to when they appear in the viewport (in this case, when the footer is visible). The same applies when using your own experimental .ig-lazy class that I found in the plugin.

    I feel like I’m a bit closer but what am I missing here?

    Thanks again!

    hi, thanks for exploring this. i am already trying to integrate lazy-load but have some issues with picture sizes. soon i will find the way.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Lazyload images’ is closed to new replies.