问题
I am having an issue only with Chrome (so far that I can tell). On this website: www.elliott-web.com the homepage displays a random image on load. After several reloads I get no image showing up, but when checking the http requests I see the image is there. Similarly, on the portfolio page if you click forward and backward through the images, eventually an image will no longer show up. Again, looks like the image is there but it's not being displayed. Thought maybe it has to do w/ Chrome's caching? I don't think it's webkit because I'm not having this problem in Safari.
Anyone else seen this before?
回答1:
I too was having the exact same issue, it also does this in Safari (Mac). In Firefox the images display and the inline CSS is not added.
What I noticed was when I turned off all extensions in Safari that the problem resolved.
In both Chrome and Safari I had AdBlockPlus installed - disabling this resolved the problem.
ABP was treating the images as ads (for whatever reason).
If you wish to keep ABP running, you can add the site to it's whitelist.
回答2:
Chrome on Windows 7 is not displaying dynamic images.
If I "View Source" the image is there.
If I inspect the HTML in Chrome, it looks like Chrome is adding CSS to hide the image:
style="display: none; visibility: hidden;
The images are displayed in Firefox and also in Chrome on Mac.
回答3:
For what it's worth I just came across the same issue on FF and Chrome on Ubuntu, Chrome on Win 7 , ad block plugin on all those browsers. Turns out image like advert-bag.png will get blocked, so would an A tag with class 'advertLink'. The funny (or not) thing is all this is related to an internal stuff on client's site. Internal marketing type of stuff like a link to a special on some item. No third party services playing any role here. Moral of the story being watch how you name things. After renaming of things that disappear in this fashion, problem went away.
回答4:
i have had the same problem , and it worked very well when i turned off all the adBlockers and such extensions , then when i wanted to make it work for all those who have adBlockers installed on their browsers , i had renamed these photos so as not to have any advertisement-like words , for example > "header.jpg" instead of "advertise-header.jpg" . so it is important to delete such words so as not to be recognized by the adBlockers.
来源:https://stackoverflow.com/questions/4908064/chrome-not-displaying-images-though-assets-are-being-delivered-to-browser