Support » Plugin: Lazy Load » Remove lazyload in indexpage

Viewing 2 replies - 1 through 2 (of 2 total)
  • It’s a hack, but if the text “data-lazy-src“* exists in your post/page content, then the plugin will not perform its image replacement magic, thereby leaving images as-is.

    So you could, for instance, insert a comment into your post/page:
    <!-- data-lazy-src -->

    Or add an arbitrary attribute to an existing image or other element in your post/page source:
    <img src="my-image.png" alt="don't lazy load me" data-hack="data-lazy-src" />

    Note that this will NOT work if you simply stick the text in your theme’s source files — it needs to be part of the loop’s content in order to be picked up by the appropriate WP filters.

    I used the latter option to prevent Lazy Load from messing with an image gallery (Meteor Slides + MaxImage 2).

    Hope this helps!
    Brian

    (*Line 40 of the plugin is where this check is performed. This is a total hack, so if you update the plugin, make sure to check that this condition still exists, and update as appropriate!)

    Thanks for the work-around, but I can’t get it to work in one situation. I have a page on which a certain number of photos load initially, then there’s a “Load More” button which loads more photos. Those subsequent photos which are are called with the “Load More” button never load with Lazy Load activated, even if I include <!-- data-lazy-src --> in the page content. I’m not able to use the second method because these photos are pulled in via shortcode, not from within the code on the page.

    Is there any other way to disable Lazy Load on a given page?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove lazyload in indexpage’ is closed to new replies.