简体   繁体   English

在Chrome和Firefox中加载图片,但不加载IE

[英]Image loading in Chrome and Firefox but not IE

A strange problem. 一个奇怪的问题。

I have the following... 我有以下...

<img src="images/source.png" border="0"/>

The image loads in Chrome and Firefox but not IE! 图片会加载到Chrome和Firefox中,但不会加载IE!

I have tried renaming the image, changing the format of the image etc etc. 我尝试重命名图像,更改图像格式等。

What could be causing this? 是什么原因造成的?

Its very late to answer this, but someone might need a solution for this 回答这个问题很晚,但是有人可能需要解决方案

Issue may be caused if your images are saved with a CMYK color profile instead of an RGB color profile. 如果将图像保存为CMYK颜色配置文件而不是RGB颜色配置文件,则可能会导致问题。 Microsoft Internet Explorer 8.0 dropped support for jpeg images saved as CMYK and now only supports images saved in RGB mode. Microsoft Internet Explorer 8.0放弃了对保存为CMYK的jpeg图像的支持,现在仅支持以RGB模式保存的图像。

or 要么

Issue can be very weird like someone renaming .jpg image to .gif or vice-verse and trying to view it in IE 问题可能很奇怪,就像有人将.jpg图片重命名为.gif或反之亦然并尝试在IE中查看

Hope this helps. 希望这可以帮助。

我的建议是删除您的IE cookie,然后尝试再次加载您的页面,因为此代码没有任何影响通过IE加载它!

You should first check with IE developer tools as to why it isn't loading. 您应该首先使用IE开发人员工具检查其为何无法加载。 Wrong path? 路径错误?

I'd also suggest adding a ./ to the beginning of your path to force the browser to understand it's a cwd relative path 我还建议在路径的开头添加一个./ ,以强制浏览器理解它是cwd相对路径。

<img src="./images/source.png" border="0"/>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM