<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question How to display an image in the form field when the field stores an image URL in ITSM forum</title>
    <link>https://www.servicenow.com/community/itsm-forum/how-to-display-an-image-in-the-form-field-when-the-field-stores/m-p/3457941#M552249</link>
    <description>&lt;P&gt;I am working on a custom scoped application in ServiceNow and trying to display a country flag image on a form.&lt;/P&gt;&lt;P&gt;The image URL is retrieved from an external REST API (ipgeolocation.io) and is successfully stored in a String field (country_flag).&lt;/P&gt;&lt;P&gt;However, instead of rendering the image, the form displays only the image URL as plain text.&lt;/P&gt;&lt;P&gt;I also tried using the Image field type, but in that case the field shows “Click to add photo” and does not render the external image URL.&lt;/P&gt;&lt;P&gt;My goal is to display the actual image on the form using the stored URL, not the URL text itself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Dec 2025 09:21:31 GMT</pubDate>
    <dc:creator>VamsiK144833510</dc:creator>
    <dc:date>2025-12-30T09:21:31Z</dc:date>
    <item>
      <title>How to display an image in the form field when the field stores an image URL</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-display-an-image-in-the-form-field-when-the-field-stores/m-p/3457941#M552249</link>
      <description>&lt;P&gt;I am working on a custom scoped application in ServiceNow and trying to display a country flag image on a form.&lt;/P&gt;&lt;P&gt;The image URL is retrieved from an external REST API (ipgeolocation.io) and is successfully stored in a String field (country_flag).&lt;/P&gt;&lt;P&gt;However, instead of rendering the image, the form displays only the image URL as plain text.&lt;/P&gt;&lt;P&gt;I also tried using the Image field type, but in that case the field shows “Click to add photo” and does not render the external image URL.&lt;/P&gt;&lt;P&gt;My goal is to display the actual image on the form using the stored URL, not the URL text itself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Dec 2025 09:21:31 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-display-an-image-in-the-form-field-when-the-field-stores/m-p/3457941#M552249</guid>
      <dc:creator>VamsiK144833510</dc:creator>
      <dc:date>2025-12-30T09:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to display an image in the form field when the field stores an image URL</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-display-an-image-in-the-form-field-when-the-field-stores/m-p/3458421#M552287</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/1011863"&gt;@VamsiK144833510&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I believe we don't have such OOTB attribute or functionality available for URL field type to render or display images from url. However we have some workarounds.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Solution 1:&amp;nbsp;&lt;/STRONG&gt;&amp;nbsp;The &lt;STRONG&gt;HTML&lt;/STRONG&gt; field type is designed to render tags. However, it usually shows a toolbar (bold, italic, etc.). We can make this to be "Read Only" so it just looks like an image.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Change your country_flag field type from &lt;STRONG&gt;String&lt;/STRONG&gt; to &lt;STRONG&gt;HTML&lt;/STRONG&gt;.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Create an &lt;STRONG&gt;onChange Client Script&lt;/STRONG&gt; (or a Business Rule) that formats the URL into an image tag.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;The Logic:&lt;/STRONG&gt; When the REST API returns the URL, don't just save https://..., save:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;img src="https://api.host.com/flag.png" width="50" height="30" /&amp;gt;&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;ServiceNow will render this HTML directly on the form.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Solution 2:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If you want the image to look like a native part of the interface without a field box around it, you can use a &lt;STRONG&gt;UI Macro&lt;/STRONG&gt; (Global) or &lt;STRONG&gt;UI Page&lt;/STRONG&gt; (Scoped).&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Create a UI Macro&lt;/STRONG&gt; (e.g., show_country_flag_image):&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;
&amp;lt;j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null"&amp;gt;
    &amp;lt;g2:evaluate var="jvar_my_var" expression="var val = current.getValue('country_flag'); val;" /&amp;gt;
    &amp;lt;img src="$[jvar_my_var]" style="height: 40px; width: auto; border: 1px solid #ddd; padding: 2px;" /&amp;gt;
&amp;lt;/j:jelly&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2 .&amp;nbsp;&lt;STRONG&gt;Create a&amp;nbsp;&lt;SPAN&gt;UI Formatter&lt;/SPAN&gt;&lt;/STRONG&gt; (e.g: Render image)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KrishnaMohan_0-1767141052774.png" style="width: 999px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/493354iACFC1443F9FDAC15/image-size/large?v=v2&amp;amp;px=999" role="button" title="KrishnaMohan_0-1767141052774.png" alt="KrishnaMohan_0-1767141052774.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Add a &lt;STRONG&gt;Formatter&lt;/STRONG&gt; to the form&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KrishnaMohan_1-1767141147466.png" style="width: 999px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/493355i751ABD6BC7827E75/image-size/large?v=v2&amp;amp;px=999" role="button" title="KrishnaMohan_1-1767141147466.png" alt="KrishnaMohan_1-1767141147466.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output : you can see the image on form from url as shown below&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KrishnaMohan_2-1767141249924.png" style="width: 999px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/493356i8491628D6BA89938/image-size/large?v=v2&amp;amp;px=999" role="button" title="KrishnaMohan_2-1767141249924.png" alt="KrishnaMohan_2-1767141249924.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If this helped to answer your query, please mark it helpful &amp;amp; accept the solution.&lt;BR /&gt;Thanks!&lt;BR /&gt;Krishnamohan&lt;/P&gt;</description>
      <pubDate>Wed, 31 Dec 2025 00:48:12 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-display-an-image-in-the-form-field-when-the-field-stores/m-p/3458421#M552287</guid>
      <dc:creator>KrishnaMohan</dc:creator>
      <dc:date>2025-12-31T00:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to display an image in the form field when the field stores an image URL</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-display-an-image-in-the-form-field-when-the-field-stores/m-p/3458441#M552289</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/1011863"&gt;@VamsiK144833510&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for image to shown it has to be stored in ServiceNow&lt;/P&gt;
&lt;P&gt;You can't directly render external image directly on platform&lt;/P&gt;
&lt;P&gt;You can try HTML type field to hold that image and then make that field readonly&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":light_bulb:"&gt;💡&lt;/span&gt; If my response helped, please mark it as correct &lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt; and close the thread &lt;span class="lia-unicode-emoji" title=":locked:"&gt;🔒&lt;/span&gt;— this helps future readers find the solution faster! &lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Dec 2025 02:50:15 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-display-an-image-in-the-form-field-when-the-field-stores/m-p/3458441#M552289</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2025-12-31T02:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to display an image in the form field when the field stores an image URL</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-display-an-image-in-the-form-field-when-the-field-stores/m-p/3458471#M552292</link>
      <description>&lt;P&gt;Thank you for taking time to provide the above steps,&lt;/P&gt;&lt;P&gt;Instead of url,is there any other way to directly load the image on the form?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Dec 2025 04:47:52 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-display-an-image-in-the-form-field-when-the-field-stores/m-p/3458471#M552292</guid>
      <dc:creator>VamsiK144833510</dc:creator>
      <dc:date>2025-12-31T04:47:52Z</dc:date>
    </item>
  </channel>
</rss>

