Can we add an image to catalog item form

Madhura5
Tera Contributor

Hi All,

Can we add an image on a catalog item form? I tried it using the HTMLtags like <img src='name.jpgx'></img> but it was not displayed on the Service Portal.

How can we add an image in the catalog variables so that it is displayed on the default view  and Service Portal

1 ACCEPTED SOLUTION

Omkar Mone
Mega Sage

Hi 

For that,

create a macro type of variable, in that you will see widget and ui macro reference fields, in the widget write the code of <img src> which will show an image on portal and add ui macro with the same code it will show on desktop view.

 

find_real_file.png

 

Desktop View Result - 

find_real_file.png

 

Portal View - 

find_real_file.png

 

Hope this helps.

 

Regards

Omkar Mone

View solution in original post

7 REPLIES 7

Alberto Consonn
ServiceNow Employee
ServiceNow Employee

Hi,

as mentioned in this thread, 

Within the help text you can use html tags, like <img src='dte.jpgx'></img>. If that will suit your requirement you can go with that.

 

For this to work, you need to set the property "glide.ui.escape_text" to "false".

Please check this system property value.

If I have answered your question, please mark my response as correct and/or helpful so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.

Thank you

Cheers
Alberto

Hi Alberto,

I have set the property "glide.ui.escape_text" to "false". But the image is not displayed in the Service Portal

 Are you sure your image you're using in the HMTL tag is present in System UI > Images?

Yes. The image is present in System UI > Images. It is displayed in Service Catalog in default view but it is not displayed when I am using Service Portal.