The CreatorCon Call for Content is officially open! Get started here.

Can we insert url in an image?

Jag7
Tera Contributor

Is it possible to create an image with text and a URL in it like below:

Jag7_0-1692774025089.png

I am calling this image in the email script. Any help would be appreciated! Thanks

10 REPLIES 10

Mohith Devatte
Tera Sage
Tera Sage

Hello @Jag7 ,

do you want to show the image on click of the link ?

Hi Mohith, Thanks for the response.

 

No URL in the image. 

Like Below is an image where 'Register now' is a 'www.url.com'

Jag7_0-1692778830976.png

 

Hello @Jag7 ,

it tried to do the same thing in PDI in my email script with the help of some CSS .

 

you can try this code but you might have to change the SRC attribute to your source value of the image.

var im = '<div class="container" style="position:relative; width: 100%;max-width: 400px;"><img src="0214ADAF-1C76-4E34-966F-0EBD09534402.png"  style ="width: 100%;height: auto;"width="300" height="450"/><a style="position: absolute;   top: 50%;left: 50%;" href="developer.servicenow.com"><p >Click Here</p></a></div>';

template.print(im);

 

Try this code in email script and see if the preview of the notification is getting the image with a link inside it .

Note: You need to change the src value according to your image 

 

Hope this helps 

Mark my answer correct if this helps you 

Thanks

Hello, I'm aware that we can insert a link, but my ask is if we can design an image that includes a clickable link within it.

Thank you.