Forums

Lazy Load
Remove lazyload in indexpage (2 posts)

  1. robertlundell
    Member
    Posted 2 months ago #

    Hi

    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?

    Br

    robertlundell.com

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

  2. ironprogrammer
    Member
    Posted 2 weeks 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!
    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!)

Reply

You must log in to post.

About this Plugin

About this Topic