Stop Lazy Load for a specific image
Place your Media Library into List View and not Gallery, and then get the ID for the chosen image. Then copy and paste that 3 times over the example code below (10576)
/* Disable lazy loading for single image* */
function wphelp_no_lazy_load_id( $value, $image, $context ) {
if ( ‘the_content’ === $context ) {
$image_url = wp_get_attachment_image_url( 10576, ‘large’ );
if ( false !== strpos( $image, ‘ src=”‘ . $image_url . ‘”‘ )) {
return false;
}
}
return $value;
}
add_filter( ‘wp_img_tag_add_loading_attr’, ‘wphelp_no_lazy_load_id’, 10576, 10576 );