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

From an attachment, how do we give a direct link to an image?

e_wilber
Tera Guru

From the sys_attachment table you can find images that are attached that could look like:

I need a way to send a direct link to the image itself, not the iix file it tries to make you download when you click into it. I'm actually trying to embed an img in one of our custom forms so I need the src URL of the image, not the converted file that ServiceNow uses.

find_real_file.png

1 REPLY 1

Anil Lande
Kilo Patron

Hi,

You can use source like below:

<p><img style="border: 1px solid black; align: baseline;" src="sys_attachment.do?sys_id=860728802f3a0510ae17debcf699b645" width="128" height="172" align="baseline" border="1" /></p>

 

Replace sys_id of your image record from attachment table in above src tag.

 

Thanks,
Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande