Linking thumbnail to full size image April 21, 2022 by Tarik Billa Simply use wp_get_attachment_url($GLOBALS['post']->ID); instead of get_permalink();