function to insert a link to an image