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.

Lazy Load
Remove lazyload in indexpage (3 posts)

  1. robertlundell
    Posted 3 years ago #


    I would like to remove the lazyload function om my indexpage. This because it prevents the thumbnails to load until the user starts to scroll.

    So is this possible?




  2. ironprogrammer
    Posted 3 years ago #

    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!

    (*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!)

  3. Mike
    Posted 2 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Plugin

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

About this Topic