I need to get the URL for Custom post type Thumbnail and assign it to
the_post_thumbnail('', array('class' => 'group1 img-responsive',
'href' =>get_permalink($thumbnail->ID)));
at this code
<?php
$args = array( 'post_type' => 'sunglassesCPT', 'posts_per_page' => 10 );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
$meta = get_post_custom($post->ID);
echo '<div class="col-sm-6 col-md-4">';
echo '<div class="thumbnail text-center">';
the_post_thumbnail('', array('class' => 'group1 img-responsive', 'href' =>get_permalink($thumbnail->ID)));
echo '<div class="caption">';
echo '<h4 class="product-title">'.the_title().'</h4>';
echo '<div class="ptitle"><p class="price">'.$meta['my_meta_box_text'][0]. '</p></div>';
echo '<p><a href="#" class="btn btn-sm btn-brown" role="button">Quick View</a></p>';
echo '</div>';
echo '</div>';
echo '</div>';
endwhile;
?>
but this not linking to the image. Can you please let me know what I am doing wrong?