Image url loads an image instead of displaying it.

I just switched the site from my work files to the server.

It worked great when I uploaded it to my portfolio, but as soon as it ended up in the correct domain, it stopped working. The image, instead of displaying, is simply displayed blank, so I tried to go to it with a direct URL.

Instead, it loads the image instead of displaying it.

Here is the direct url: Direct URL

My tag: <img src="images/login_header.svg" alt="Alright, lets start finding discounts!" /> <img src="images/login_header.svg" alt="Alright, lets start finding discounts!" />

My structure:

 // root (BBCM) //// images ////// login_header.svg //// css //// js // end root 

I tried:

  • /images/url.svg

  • direct url for image

  • Bbcm / images / url.svg

It works great when it is on portfolio , but not on the correct domain .

Any ideas? When the image loads, it also displays the correct image, so I'm a little lost here.

+6
source share
3 answers

Does your server send a .svg file with the correct MIME type? This should be image/svg+xml .

See Nginx suggests downoload SVG instead of showing it for another question on the same lines.

+3
source

try instead of <object data="/images/login_header.svg" type="image/svg+xml"></object>

0
source

Some browsers do not allow the IMG tag to support SVG files, however you can put it in an object with an image as a reserve in case the browser cannot display it.

 <object data="image.svg" type="image/svg+xml"> <img src="fallbackimage.jpg" /> </object> 
0
source

All Articles