Display post image with fancybox

When you echo something, you need to be echoing the variable. You are using the_post_thumbnail_url, which in itself is already an echo statement. You should be using get_the_post_thumbnail_url instead.

echo "<a class="fancybox" rel="group" href="" . get_the_post_thumbnail_url( get_the_ID(), "full' ) . "'>";

EDIT: Also, missing the $post_id, fixed to include it in the function