Support » Plugin: Autoptimize » Image optimization on a per post type 2.0

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    ah, but image optimization and lazyload are 2 different (though related) things. the code snippet disables the optimization (the shortpixel integration). to disable lazyload you need to act on the autoptimize_filter_imgopt_should_lazyload filter, so the first line has to be changed to

    
    add_filter(‘autoptimize_filter_imgopt_should_lazyload’, ‘no_imgopt_posts’);
    Thread Starter outcats85

    (@outcats85)

    Thanks a lot!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    you’re welcome 🙂

    Hello there!

    I’ve got the same problem. I’d like to turn off lazy loading the images on some posts. I have the conditions written already. And below them I have the code:

    add_filter(“autoptimize_filter_imgopt_should_lazyload”, “__return_false”);

    and it doesn’t work.

    The images are still served with “<noscript>” tag.

    My bad. It was Smush’s lazy load who was the troublemaker.
    You’re awesome!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Image optimization on a per post type 2.0’ is closed to new replies.