They do not load the images in chrome but if in internet explorer in debug

I have a problem and have searched everywhere but find nothing about it.

The case is that in my program I load some images that comes from a server and when I do the debug in my Internet Explorer browser it shows me the image correctly, but when I do it by Google Chrome it does not show it but if it can be downloaded by right clicking.

<img src="@ViewBag.ImageData" alt="No se encuentra la imagen" style="width:90%" id="ImagenTapa" class="w3-animate-zoom" />

How could I solve this problem?

 1
Author: Roger Garcia, 2016-07-28

1 answers

When you assign a direct image to src you should do so by encoding it to base64

6.1. Embedded images

For it to work properly you should make sure you indicate the mediatype

<img src=”data:image/png;base64,iVBORw0KGgoAAAANS… (see source for full base64 encoded image) …8bgAAAAASUVORK5CYII=”>

The data:image/png is important to indicate

 0
Author: Leandro Tuttini, 2016-07-29 04:52:10