apply_filters ( 'lazyload_is_enabled', bool true )

Whether the lazy-images module should load.<p>This filter is not prefixed with jetpack_ to provide a smoother migration process from the WordPress Lazy Load plugin.</p>

Source file: jetpack_vendor/automattic/jetpack-lazy-images/src/lazy-images.php

View in GitHub



(bool) true Whether lazy image loading should occur.


Since: Jetpack 1.0.0


Have a note to contribute?

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


  1. Leni Neto says:

    Is there a way to use this filter, or even manually set an image to lazy load? I noticed photon users a preg_match_all to find images using an tag but it doesn’t find background images.

    • Jeremy says:

      That filter will not allow you to enable Lazy Load for images that are not lazy loaded today.

      If Lazy Images does not pick up some of your images right away, could you start a new issue here and give us some details about your theme and the images that don’t get picked up? We’ll see if we can edit Jetpack so it starts taking those images into account.

      Thank you!

      • Leni Neto says:

        Hi Jeremy,

        Thanks for your reply.
        I see the preg_match_all function on Jetpack is searching for “”.
        Problem for me is my theme (like many others) uses parallax images and those images are set as backgrounds, like this:


        section id=”section1″ data-overlay=”5″ data-vc-parallax-image=”https://image.url”>


        div class=”background-image-holder” style=”transform: translate3d(0px, -1262.31px, 0px); background: url(“https://image.url”); opacity: 1;”>

        As you can see, the image is loaded as the layer background, and Jetpack does not catch that.

      • Jeremy says:

        That’s a good point. Do you think you could open an issue here with more details about your theme, so we can consider how to add support for that theme and others like it?

        Thank you!

      • Leni Neto says:

        Done! And sorry about my incomplete response here, I didn’t notice the code I posted here got completely broken.

  2. djordjekrstic says:

    Is there a way to exclude certain images on the page from being lazy loaded?
    I want them to load normally.
    For example on archive page where posts have Masonry layout, lazy load changes layout after you scroll to images that where not in viewport.
    I know that I can do relayout on masonry after lazy load but that’s going to be very jittery.

    • Jeremy says:

      That’s not an option right now, but it will become possible early next month, when Jetpack 5.9 becomes available; the update will allow you to mark images so Lazy Load does not get applied to them, by adding the skip-lazy CSS class to the image.

  3. Sergio Scabuzzo (@ecotechie) says:
    add_filter( 'lazyload_is_enabled', 'echotechie_lazyload_exclude', 15 );
    function echotechie_lazyload_exclude() {
        if ( is_page( array( 12, 'slug', 'Title' ) ) ) {
            return false;
        } else {
            return true;

    Now just change the 12, ‘slug’, ‘Title’ to whatever page you want to exclude from lazy loading 😉

    Or remove the whole array() and add a single field.

    • Richard Owens says:

      hello, could you tell me how to add_filter with buddypress avatar crop?

      • Adam says:


        I’m not quite sure what you mean here. Can you explain more about what you’re trying to do?

        Thanks! 🙂

      • Richard Owens says:

        Sorry, my bad. I use Buddypress Plugin and when I upload avatar user, unfortunately lazy load effect to the image (avatar) then it is not showing up. I try to add_filer which certain page slug ‘members’ but it is not work. So I wonder there any way to disable lazy load with specific src or div class. I also tried filter by black list classes image but not work.

      • Adam says:


        Ah, I see now. The code that Sergio posted above seems like it should work to selectively disable lazy load on certain pages, though I have not tested it. Writing custom code to integrate two plugins isn’t really something we can help with though. Have you tried using the page ID maybe?

        Sorry I can’t be of more help here! 😦

      • Richard Owens says:

        Okay I will try another solution. Thank you for reply.

  4. De Glims Global Links Ltd says:

    Does it work with android phone?