How to run this filter only on some specific registered thumbnail sizes '$size' ? like 'large' , 'medium' ....
add_filter( 'wp_get_attachment_image_attributes', 'wpse8170_add_lazyload_to_attachment_image', 10, 2 );
function wpse8170_add_lazyload_to_attachment_image( $attr, $attachment ) {
$attr['data-original'] = $attr['src'];
$attr['src'] = 'grey.gif';
return $attr;
}
Thanks