• Resolved mburdett555

    (@mburdett555)


    I’m trying to disable lazyloading on a per page basis.
    Whilst there is a meta box on the WordPress page editor, to disable lazyload and other Autoptimize functions, this does not work – at least for my scenario.

    I am producing a TinyMCE content editor via functions.php shortcode, and have found that Autoptimize’s lazyload is affecting the blobs and not converting images properly in the TinyMCE editor. Disabling lazyload fixes this.

    So does anyone know of any (other) way I can disable lazyload? I found the below on another topic but it makes no difference.

    if(is_page(457)){
    	add_filter( 'autoptimize_filter_imgopt_should_lazyload', '__return_false' );
    }

    Given that content editor images could be nested in a range of tags, I cant broadly exclude like “.myclass img, .myclass p img” etc.

    Any advice much appreciated. Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How Can I Exclude Lazyload By Page?’ is closed to new replies.