if (has_post_thumbnail()) {
$thumb = wp_get_attachment_image_src(get_post_thumbnail_id(), 'thumbnail');
$thumb_alt = trim(strip_tags( $attachment->post_excerpt ));
$thumb_title = trim(strip_tags( $attachment->post_title ));
echo '<img src="'.$thumb[0].'" alt="'.$thumb_alt.'" title="'.$thumb_title.'" />';
}