$thumbnails = get_posts('numberposts=2000','category=3');
foreach ($thumbnails as $thumbnail) {
if ( has_post_thumbnail($thumbnail->ID)) {
echo ‘ID ) . ‘“ title=“‘ . esc_attr( $thumbnail->post_title ) . ‘“>’;
echo get_the_post_thumbnail($thumbnail->ID, ‘thumbnail’);
echo ‘‘;
}
}
?>