Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Image url downloads the image instead of displaying it

Tags:

html

image

svg

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

It worked fine when I uploaded it to my portfolio but once it was on the correct domain it stopped working. The image, instead of displaying, just shows up blank so I tried going to it's direct url.

Instead of it working it downloads 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!" />

My structure:

// root (BBCM)

//// images

////// login_header.svg

//// css

//// js

// end root

I have tried:

  • /images/url.svg

  • the direct url for the image

  • BBCM/images/url.svg

It works fine when it's on my portfolio but not on the correct domain.

Any ideas? When the image downloads it also displays the correct image so I am a bit lost here.

like image 208
Josh Powell Avatar asked Feb 03 '14 15:02

Josh Powell


1 Answers

Is your server sending the .svg file down with the correct MIME type? It should be image/svg+xml.

See Nginx offers of downoload SVG instead of showing it for another question along the same lines.

like image 133
Olly Hodgson Avatar answered Oct 08 '22 01:10

Olly Hodgson