getting an link url for a picture online code example
Example 1: get featured image url
echo get_the_post_thumbnail_url();
Example 2: how to add a link in image
<a href="https://www.google.com/">
<img alt="Qries" src="https://lh3.googleusercontent.com/NGPrjka2ai0w7sfhxkxCwtOSh2wVyEZMdtrVxI4vrA22ebA_fcyl9PSvhTaCYXSWh0A68ZhvXhVZ4U-Nnp3v9IfoXg5o5H1tjjK97cs">
</a>