How to link to featured image to media file URL

You would need to edit your themes single.php template file and modify the line of code calling the featured image. It would look something like this:

<?php the_post_thumbnail(); ?>

Replace it with this…

<?php 
 if ( has_post_thumbnail()) {
   $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');
   echo '<a class="lightboxclassname" href="' . $large_image_url[0] . '" title="' . the_title_attribute('echo=0') . '" >';
   the_post_thumbnail('thumbnail');
   echo '</a>';
 }
 ?>

Then make sure you replace the class name (‘lightboxclassname’) with whatever the class name is that your current lightbox script needs to trigger the popup on click.

You can find info on WordPress Codex here: http://codex.wordpress.org/Function_Reference/the_post_thumbnail

tech