title: Display an image - Popup ArcGIS API for Javascript
body: <p>I'm trying to display an image in a popup, I've read the documentation, I've seen the code of some samples (and also made some attempts using <code>ImageValue</code> and <code>ImageContent</code>), but when I click on the map element with the popup, the image doesn't show. I can't figure out what I'm doing wrong.
  Here is my code now <a href="https://i.stack.imgur.com/6fiTa.png" rel="nofollow noreferrer">and here is my popup when I click on a point</a>:</p>
  <pre><code>            var attr = {
                  Lat: arr[i][0], //latitude
                  Lng: arr[i][1], //longitude
                  Image: &quot;localimage.jpg&quot; //image in same folder
              };
              
              var template = new PopupTemplate({
                title: &quot;Lat: {Lat} Lng: {Lng}&quot;,
                mediaInfos: [{
                  &quot;title&quot;: &quot;&quot;,
                  &quot;caption&quot;: &quot;&quot;,
                  &quot;type&quot;: &quot;image&quot;,
                  &quot;value&quot;: {
                    &quot;sourceURL&quot;: &quot;{Image}&quot;
                  }
                }]
              });
              
             //when I click on this point after I've added it to the map,
             //the image doesn't show
               var pointGraphic = new Graphic({
                      geometry: point,
                      symbol: pictureMarkerSymbol, //custom marker
                      attributes: attr,
                      popupTemplate: template
               }); 
  </code></pre>
  <p><strong>EDIT</strong>: I've re-read some samples, trying to understand what I was missing and keeping in mind the answer given here, in the end the solution was that I've missed some parenthesis:</p>
  <pre><code>var template = new PopupTemplate({
                title: &quot;Lat: {Lat} Lng: {Lng}&quot;,
              content: [{ //Missed [ here
                  type: &quot;media&quot;,
                  mediaInfos: [{
                  title: &quot;&quot;,
                  caption: &quot;&quot;,
                  value: {
                     sourceURL: &quot;{Image}&quot;
                  }
          }]
      }] //Missed ] here
  });
  </code></pre>
  <p>Thanks for the reply, hope this helps someone in the future</p>