Add filter on certain thumbnail sizes only

This is a hack, but I guess it should work…

add_filter( 'wp_get_attachment_image_attributes', 'wpse8170_add_lazyload_to_attachment_image', 10, 2 );
function wpse8170_add_lazyload_to_attachment_image( $attr, $attachment ) {
    //use your image size here with attachment
    if($attr['class'] == 'attachment-large'){
        //do your stuff
    }
    return $attr;
}