Hi guys I have been trying to get the set the featured image url but it I can only link to the post itself or to the image itself, when I add featured image on the link URL I add a different link but it doesnt work is there a way I can add different link on the featured image and then retrieve this link on the code? so it would be something like

<a href="<?php link_url(); ?>"><?php the_post_thumbnail('medium'); ?></a>