chrome和firefox中的破碎图像在safari中工作 [英] broken image in chrome and firefox works in safari
问题描述
我有一个在Safari中显示的徽标但在Chrome中它显示为断开的链接,根本不会在Firefox中显示。
I have a logo that shows up in Safari but in Chrome it appears as a broken link and simply does not show up at all in Firefox.
<a href="index.html"><img src="images/logo-01.png"/></a>
我重新上传了很多次,甚至尝试了其他路径和文件名。
I have re-uploaded it many times and have even tried alternative paths and file names.
任何人都知道我可能会搞砸了吗?
anyone know how i might be screwing this up?
推荐答案
我遇到了同样的问题。对我来说,事实证明图像是腐败的。如果我试图在photoshop中打开png文件,我会收到错误,说它无法解析文件。
I ran into this same problem. For me, it turns out the image was corrupt. If i tried to open the png file up in photoshop, i would get an error saying it could not parse the file.
无论出于何种原因,safari都可能显示损坏的文件,但铬不能。这就是我解决问题的方法。我注意到我的macbook上的预览可以打开文件。如果您使用的是Windows,可以尝试使用paint或gimp或者除photoshop之外的其他程序。
For whatever reason, safari could display the corrupt file, but chrome could not. This is how i fixed my issue. I noticed "preview" on my macbook could open the file fine. If you are using windows, possibly try paint or gimp or some other program besides photoshop.
- 我将损坏的文件下载到我的macbook上,打开它具有预览(打开>预览)
- 在预览应用程序中,转到文件>复制,它会复制您的图像
- 保存那个重复的图像
- 作为测试,我尝试在photoshop中打开新的复制图像,然后我就可以了!
- 将新文件上传到网站。我现在能够以chrome的形式查看图像。
- I downloaded the corrupt file onto my macbook, opened it with preview (open with > preview)
- In the preview app, go to file > duplicate, which makes a copy of your image
- Save that duplicated image
- As a test, i tried opening that new copied image in photoshop and i was able to!
- Upload new file to website. I was able to view the image in chrome now.
希望能帮助遇到同样问题的人。
Hope that helps anyone who ran into the same problem.
这篇关于chrome和firefox中的破碎图像在safari中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!