Get Posts that have featured Images


$args = array(
'post_type' => 'post',
'posts_per_page' => 7,
'meta_query' => array(
array(
'key' => '_thumbnail_id',
'compare' => 'EXISTS'
),
)
);

$query = new WP_Query($args);
while($query->have_posts()) {
$query->the_post();
if ( has_post_thumbnail() ) { // double checking
$out.= the_title();
$out.= get_the_post_thumbnail('thumbnail');
}
}