How to display Base64 images in HTML

My suspect is of course the actual Base64 data. Otherwise it looks good to me. See this fiddle where a similar scheme is working. You may try specifying the character set.

  <p>Taken from wikpedia</p>
  <img src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUA
        9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot" />

You can try this Base64 decoder to see if your Base64 data is correct or not.

Leave a Comment