// outside the loop
Code:
$post = get_post(99);
$thumb_url = get_the_post_thumbnail_url($post->ID,'full');
echo '<a href="'.esc_url($thumb_url).'">Click Here</a>';
// inside the WP loop
Code:
while ( have_posts() ) {
the_post();
$thumb_url = get_the_post_thumbnail_url(get_the_ID(),'full');
echo '<a href="'.esc_url($thumb_url).'">Click here</a>';
endwhile;
