You could use this loop for fetching the images from current post.
<?php
$images = get_posts(array(
'post_parent' => get_the_ID(),
'post_type' => 'attachment',
'posts_per_page' => 5,
'post_mime_type' => 'image'
));
if( $image ) {
foreach($images as $image) :
echo wp_get_attachment_link( $image->ID, 'thumbnail-size', true );
endforeach;
}
?>
reference: