<?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 Re: img src for base64 images are being removed by the popup in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/img-src-for-base64-images-are-being-removed-by-the/m-p/1359106#M83078</link>
    <description>&lt;P&gt;This can be accomplished via &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#content" target="_blank" rel="noopener"&gt;CustomContent&lt;/A&gt; for the PopupTemplate. The &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-ImageMediaInfo.html" target="_blank" rel="noopener"&gt;ImageMediaInfo&lt;/A&gt; is probably the cleanest way to do it for images. Here is a &lt;A href="https://odoe.net/blog/custom-popup-content" target="_blank" rel="noopener"&gt;blog post&lt;/A&gt; on pulling images from a third-party API that might help too.&lt;/P&gt;</description>
    <pubDate>Mon, 11 Dec 2023 15:18:37 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2023-12-11T15:18:37Z</dc:date>
    <item>
      <title>img src for base64 images are being removed by the popup</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/img-src-for-base64-images-are-being-removed-by-the/m-p/1358927#M83076</link>
      <description>&lt;P&gt;I'm using v4.27.6 and, no matter how I try to insert the images, as long as they're base64, the img gets their src totally cleaned up&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;let businessGallery = '';

if (this.searchResultsGalleries[element.id] != undefined) {
    this.searchResultsGalleries[element.id].forEach(element2 =&amp;gt; {
        businessGallery += `
            &amp;lt;div&amp;gt;
                &amp;lt;img src="${element2}"/&amp;gt;
            &amp;lt;/div&amp;gt;
        `;
    });
}
// ...

element.graphic = Maps.AddPoint({
    longitude: mapPoint.longitude,
    latitude: mapPoint.latitude,
    attributes: {
        title: '',
        description: `
            &amp;lt;div class="content-gallery ${businessGallery == '' ? 'd-none' : ''}"&amp;gt;
                ${businessGallery}
            &amp;lt;/div&amp;gt;
        `
    }
});&lt;/LI-CODE&gt;&lt;P&gt;In the DOM it looks like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CLAUDIAROJOARDILA_0-1702250810663.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88580iD51761D2DEF92E4E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CLAUDIAROJOARDILA_0-1702250810663.png" alt="CLAUDIAROJOARDILA_0-1702250810663.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I already confirmed businessGallery has actual data for their images so much so that you can see the dots corresponding to each image that it was supposed to be displayed (8 in total).&lt;/P&gt;&lt;P&gt;I read somewhere this was some sort of bug, in arcgis 3 this simply worked fine so I don't really know what to try to make it work on 4 as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate any help&lt;/P&gt;</description>
      <pubDate>Sun, 10 Dec 2023 23:29:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/img-src-for-base64-images-are-being-removed-by-the/m-p/1358927#M83076</guid>
      <dc:creator>CLAUDIAROJOARDILA</dc:creator>
      <dc:date>2023-12-10T23:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: img src for base64 images are being removed by the popup</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/img-src-for-base64-images-are-being-removed-by-the/m-p/1359106#M83078</link>
      <description>&lt;P&gt;This can be accomplished via &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#content" target="_blank" rel="noopener"&gt;CustomContent&lt;/A&gt; for the PopupTemplate. The &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-ImageMediaInfo.html" target="_blank" rel="noopener"&gt;ImageMediaInfo&lt;/A&gt; is probably the cleanest way to do it for images. Here is a &lt;A href="https://odoe.net/blog/custom-popup-content" target="_blank" rel="noopener"&gt;blog post&lt;/A&gt; on pulling images from a third-party API that might help too.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 15:18:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/img-src-for-base64-images-are-being-removed-by-the/m-p/1359106#M83078</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2023-12-11T15:18:37Z</dc:date>
    </item>
  </channel>
</rss>

