title: How to display an image stored in SQL Server field using image data type?
body: <p>Good day</p>
  
  <p>I'm trying to show an image using DATA URIs and encoding a string in base64 as shown below:</p>
  
  <pre><code>&lt;img src="data:image/jpeg;base64,&lt;?php base64_encode($FOTO) ?&gt;" /&gt;
  </code></pre>
  
  <p>The image (JPG) is stored in the database in this way:</p>
  
  <p><a href="https://i.stack.imgur.com/xQsFv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xQsFv.png" alt="structure of the table"></a></p>
  
  <p><a href="https://i.stack.imgur.com/Vweoi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Vweoi.png" alt="stored image"></a></p>
  
  <p>The problem is that using that DATA URI, it does not show the image on the screen. I don't know the error or if I have to do something different to be able to show that stored image.</p>
  
  <p><a href="https://i.stack.imgur.com/jlzT7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jlzT7.png" alt="HTML source code"></a></p>
  
  <p><a href="https://i.stack.imgur.com/NONlb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NONlb.png" alt="Image not created :( "></a></p>
  
  <p>Is there any other way to display these images stored in SQL Server?</p>
  
  <p>Thank you very much for your time.</p>