I have this piece of code I found on some blog, that\'s supposed to display all images from a WordPress post.
function getImage() {
global $more;
$m
'attachment',
'numberposts' => -1,
'post_parent' => $post->ID
);
$attachments = get_posts( $args );
if ( $attachments )
{
foreach ( $attachments as $attachment )
{
echo wp_get_attachment_image( $attachment->ID, false );
}
}
endwhile;
?>
Source : http://960development.com/code-snippet/get-all-the-images-attached-with-a-wordpress-post/