Image optimization on a per post type 2.0
-
Hi,
I’ve tried the code (https://www.ads-software.com/support/topic/image-optimization-on-a-per-post-type/):
add_filter(‘autoptimize_filter_imgopt_do’, ‘no_imgopt_posts’);
function no_imgopt_posts() {
if ( is_page() ) {
return true;
} else {
return false;
}
}To disable the image optimization on posts and enable it onlt on pages but it looks like the lazyloading is still working on posts. Check this out:
This is a page and the lazyloading works as expected: https://www.fabionodariphoto.com/
This is a post and the lazyloading should be disabled but it’s still active: https://www.fabionodariphoto.com/vendere-foto/
Thanks
Viewing 6 replies - 1 through 6 (of 6 total)
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.