If you add support for Post Thumbnails, you can use its own function instead of get_post_meta()
, see codex for more information – http://codex.wordpress.org/Post_Thumbnails#Function_Reference
Use following code in your theme:
<div class="postcont>
<?php
if ( has_post_thumbnail() ) {
the_post_thumbnail();
}
the_excerpt();
?>
</div>
EDIT
And using the OP’s code:
$args = array( 'numberposts' => 5, 'category' => 3,4,5,6,7 );
$posts = query_posts( $args . '&orderby=date&order=desc' );
foreach( $posts as $post ) : setup_postdata($post); ?>
<li>
<h2><a href="https://wordpress.stackexchange.com/questions/28967/<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<div class="postcont">
<?php
if ( has_post_thumbnail() ) {
the_post_thumbnail();
}
the_excerpt(); ?>
</div>
</li>
<?php endforeach; ?>