alexvance
alexvance

Reputation: 1124

Images not appearing on site; accessible directly through url

I have an HTML site that is using several images that do not load in Chrome [edit: and in some people's Firefoxes, not mine].

Using Chrome inspector I can see that they are given a size of 1px by 1px. Plus, the following inline styling is being added to the jpgs (not the png): style="display: none !important; visibility: hidden !important; opacity: 0 !important; background-position: 0px 0px;" width="0" height="0" on my site, though not in the jsfiddle. (Let's focus on the first part.)

When I view the same site locally, they display fine. What the heck? Take a look: http://jsfiddle.net/3HtPH/2/.

Edit: thanks to Gaby aka G. Petrioli, I figured out that it's due to AdBlock, which I have installed on Chrome and not my other browsers, blocking any resource named 'ad-_.' AdBlock also blocks a whole lot of class and id names that start with 'ad.'

Upvotes: 17

Views: 3766

Answers (2)

Gabriele Petrioli
Gabriele Petrioli

Reputation: 195971

The non-loading images are named ad-something..

That means you have an ad-blocker (browser plugin) that is blocking those images thinking that they are advertisements..

Upvotes: 37

JJJ
JJJ

Reputation: 33163

The host uses hotlink prevention, i.e. they're blocking the usage of their images from outside their own domain.

Upvotes: 0

Related Questions