<?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>topic PNG in Popup in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/png-in-popup/m-p/1045501#M72431</link>
    <description>&lt;P&gt;Using the below code I'm not able to put an image in my pop up, which is stored as a URL in the &lt;STRONG&gt;&lt;EM&gt;logo&lt;/EM&gt;&lt;/STRONG&gt; field of an attribute table of a hosted feature layer. I thought putting the name of the field in the curly brackets would enable you to have that field value ( in this case a &lt;A href="https://webapp.willcountyillinois.com/gisweb/images/green_logo_batteries.png" target="_self"&gt;URL to an image&lt;/A&gt;) show up in the pop-up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt; //***popups***
    //popup template for table
    var template = {
        //autocasts the new template
        title: "&amp;lt;img src={logo} height='60' width='60'&amp;gt;&amp;lt;font size='2.75px'&amp;gt;&amp;lt;b&amp;gt;{USER_Name}&amp;lt;/b&amp;gt;",
        content: [
            {
                //set content elements in the order to display
                type: "fields",
                fieldInfos: [
                    {
                        fieldName: "USER_Addre",
                        label: "Address",
                        visible: true
                    },
                    {
                        more fields, etc...
                    }
                ]
            }
        ]
    };

// Recycle Layer
    var recycleLayer = new FeatureLayer({
        portalItem: {
            // autocasts as new PortalItem()
            id: "b5665da3feab4b6091914cbfe4ab028f"
        },
        popupTemplate: template,
        outFields: ["*"],
        visible: false
    });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Here's an screenshot of the popup currently. There is a white space to the left of the title where the logo should be, but the logo isn't there. Am I missing something in the javascript?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="logo.png" style="width: 801px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/10503iD4D01C2B06314AAD/image-size/large?v=v2&amp;amp;px=999" role="button" title="logo.png" alt="logo.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here's a mock-up of how I want it.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="logo2.png" style="width: 801px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/10504iBAEE42567B44DB87/image-size/large?v=v2&amp;amp;px=999" role="button" title="logo2.png" alt="logo2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Apr 2021 16:42:15 GMT</pubDate>
    <dc:creator>JaredPilbeam2</dc:creator>
    <dc:date>2021-04-09T16:42:15Z</dc:date>
    <item>
      <title>PNG in Popup</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/png-in-popup/m-p/1045501#M72431</link>
      <description>&lt;P&gt;Using the below code I'm not able to put an image in my pop up, which is stored as a URL in the &lt;STRONG&gt;&lt;EM&gt;logo&lt;/EM&gt;&lt;/STRONG&gt; field of an attribute table of a hosted feature layer. I thought putting the name of the field in the curly brackets would enable you to have that field value ( in this case a &lt;A href="https://webapp.willcountyillinois.com/gisweb/images/green_logo_batteries.png" target="_self"&gt;URL to an image&lt;/A&gt;) show up in the pop-up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt; //***popups***
    //popup template for table
    var template = {
        //autocasts the new template
        title: "&amp;lt;img src={logo} height='60' width='60'&amp;gt;&amp;lt;font size='2.75px'&amp;gt;&amp;lt;b&amp;gt;{USER_Name}&amp;lt;/b&amp;gt;",
        content: [
            {
                //set content elements in the order to display
                type: "fields",
                fieldInfos: [
                    {
                        fieldName: "USER_Addre",
                        label: "Address",
                        visible: true
                    },
                    {
                        more fields, etc...
                    }
                ]
            }
        ]
    };

// Recycle Layer
    var recycleLayer = new FeatureLayer({
        portalItem: {
            // autocasts as new PortalItem()
            id: "b5665da3feab4b6091914cbfe4ab028f"
        },
        popupTemplate: template,
        outFields: ["*"],
        visible: false
    });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Here's an screenshot of the popup currently. There is a white space to the left of the title where the logo should be, but the logo isn't there. Am I missing something in the javascript?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="logo.png" style="width: 801px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/10503iD4D01C2B06314AAD/image-size/large?v=v2&amp;amp;px=999" role="button" title="logo.png" alt="logo.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here's a mock-up of how I want it.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="logo2.png" style="width: 801px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/10504iBAEE42567B44DB87/image-size/large?v=v2&amp;amp;px=999" role="button" title="logo2.png" alt="logo2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 16:42:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/png-in-popup/m-p/1045501#M72431</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2021-04-09T16:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: PNG in Popup</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/png-in-popup/m-p/1045533#M72434</link>
      <description>&lt;P&gt;My mistake. The feature layer I was calling in the javascript above was a View. So, I had to check the box for the logo field in the Define Fields window of the View, which is left unchecked by default when you add a field ( in this case I added the logo field) after the View was already created.&lt;/P&gt;&lt;P&gt;View --&amp;gt; Visualization Tab--&amp;gt; Set View Definition --&amp;gt; Define Fields&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="view.png" style="width: 800px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/10522i5B11D47F3F266D66/image-size/large?v=v2&amp;amp;px=999" role="button" title="view.png" alt="view.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="view2.png" style="width: 600px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/10521iA51CE14A7A05C96D/image-size/large?v=v2&amp;amp;px=999" role="button" title="view2.png" alt="view2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="logo3.png" style="width: 600px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/10524i4970BE5D5A06ED93/image-size/large?v=v2&amp;amp;px=999" role="button" title="logo3.png" alt="logo3.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 17:43:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/png-in-popup/m-p/1045533#M72434</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2021-04-09T17:43:11Z</dc:date>
    </item>
  </channel>
</rss>

