Question

I've got an HTML page.

Inside an <img> tag, the src= points to an external website:

<img src="http://a.website.com/an_image.jpg" />

In firefox, the image doesn't load. However, if I inspect the element with firebug, hovering on the link will show me the correct thumbnail (as firebug does), so I know the link is correct.

Also, in Chrome the same image loads fine.

Why is it not loading in Firefox?

Additional details that may/may not be useful:

  • It's a python Django application running locally with the development server
  • Application: Firefox 9.0.1 (20111228084940)
  • Operating System: Linux (x86_64-gcc3)

[EDIT] Plugins:

  • [EDIT] Plugins removed -- no need for them, the problem turned out to be different

[EDIT] Posted below are the request headers from Firefox and Chromium respectively:

Firefox:

Accept  image/png,image/*;q=0.8,*/*;q=0.5
Accept-Charset  ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Encoding gzip, deflate
Accept-Language en-gb,it-it;q=0.7,it;q=0.3
Cache-Control   max-age=0
Connection  keep-alive
Host    ia.media-imdb.com
If-Modified-Since   Fri, 03 Sep 2010 17:18:00 GMT
Referer http://127.0.0.1:8001/bulk_action/
User-Agent  Mozilla/5.0 (Ubuntu; X11; Linux x86_64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1

Chromium:

Accept: */ *
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-GB,en-US;q=0.8,en;q=0.6
Cache-Control:max-age=0
Connection:keep-alive
Host:ia.media-imdb.com
If-Modified-Since:Fri, 03 Sep 2010 17:18:00 GMT
Referer:http://localhost:8001/bulk_action/
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.7 (KHTML, like Gecko) Ubuntu/11.10 Chromium/16.0.912.75 Chrome/16.0.912.75 Safari/535.7
Was it helpful?

Solution

Does the site you refer to allow remote linking? Some sites disallow this by checking the referrer header. It's entirely possible that firebug is not using the referrer at all, but firefox will do it when loading your page.

In the firebug net tab, you should be able to see the request for the image. Check the response for that. Is it a 200 (http ok)? if so, is the data that is sent correct, or is it blank?

OTHER TIPS

For anyone that comes across this and has cookie blockers or similar installed.

I had this issue just now as well, but it turned out it was Privacy Badger that was disallowing Trip Advisor to load it's images, by disabling Trip Advisor cookies. However, there is not much you can do to stop this repeating itself on other people's computers if they have privacy software enabled.

Here's two screenshots of before and after.

Trip Advisor logos not visible, due to cookie blocker

Trip Advisor logos visible, after cookies were allowed

This is because the option "Load images automatically" is disabled in your Firefox (option dialog, "Content" panel), in such a case Firefox will only load images with local paths, not remote images.

https://support.mozilla.org/en-US/kb/fix-problems-images-not-show#w_check-image-permissions

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top