title: XSL - Show an image stored as a blob
body: <p>Originally, I had a table in SQL Server with a field that contained an URL to a picture.</p>
  
  <p>I created an XSL template to customize the info window of that table in ArcMap. To show that image I only had to do this:</p>
  
  <pre><code>&lt;xsl:variable name="pic" select="$theField[FieldName='PIC']/FieldValue"/&gt;
  &lt;img border="0" src="{$pic}" width="200"/&gt;
  </code></pre>
  
  <p>Now, the picture is stored as a blob in the database. A <code>VARBINARY</code> field.</p>
  
  <p>How can I set the <code>&lt;img&gt;</code> tag from a blob source?</p>
  
  <p>I've been reading several answers for similar issues <a href="https://stackoverflow.com/questions/37654452/foinstream-foreign-object-does-not-show-the-image-properly">here</a> and <a href="https://stackoverflow.com/questions/18701036/stream-a-blob-image-through-a-xml-xslt-process">here</a>, but they don't fit my case or I'm being incapable of doing it.</p>
  
  <p>Is even possible to accomplish it with just an XSL template?</p>
  
  <p>I have already tried this (and similar variations):</p>
  
  <pre><code>&lt;fo:instream-foreign-object content-type="image/png"&gt;
      &lt;xsl:variable name="pic" select="$theField[FieldName='PIC']/FieldValue"/&gt;
      &lt;img border="0" src="{$pic}" width="200"/&gt;
  &lt;/fo:instream-foreign-object&gt;
  </code></pre>