Skip lazy loading images which contain preload images in Smush

Skip lazy loading images which contain preload images in Smush on child sites.

Snippet Type

Execute on Child Sites

Snippet

add_filter('smush_skip_image_from_lazy_load', function( $skip, $src, $image ){
	//compare the $src here and return true to skip
	return $skip || strpos( $src, '/preloader.png' );
}, 99, 3);

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.