图片网址会下载图片而不是显示图片 [英] Image url downloads the image instead of displaying it
问题描述
我只是将站点从我的工作文件切换到服务器.
I just switched the site from my working files to the server.
当我将其上传到我的投资组合中时,它工作正常,但是一旦它进入正确的域,它便停止工作.该图像没有显示,而是显示为空白,因此我尝试使用直接URL.
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.
这里是直接网址:直接网址
我的标签:<img src="images/login_header.svg" alt="Alright, lets start finding discounts!" />
我的结构:
// root (BBCM)
//// images
////// login_header.svg
//// css
//// js
// end root
我尝试过:
-
/images/url.svg
/images/url.svg
图片的直接网址
BBCM/images/url.svg
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.
推荐答案
您的服务器是否使用正确的MIME类型向下发送.svg
文件?它应该是image/svg+xml
.
Is your server sending the .svg
file down with the correct MIME type? It should be image/svg+xml
.
请参见 Nginx提供的下载SVG而不是显示,同样的问题.
这篇关于图片网址会下载图片而不是显示图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!