You need a single URL that provides an image when embedded and a link when
clicked. Pass your link
and your image
to the /image
endpoint.
/image?link=absolute-page-link&image=absolute-image-link
https://destinationpng.netlify.app/image?link=https://www.example.com&image=https://picsum.photos/536/354
Rendered with:
<a href="$link">
<img src="$link"/>
</a>
Produces: