Firefox does not render image in some cases




2 years ago
2 years ago


(Reporter: ltrifoi, Unassigned)


47 Branch
Windows 7

Firefox Tracking Flags

(Not tracked)




2 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36

Steps to reproduce:

Step 1) Host a webpage on a web-server (I used a tomcat 8 server). Let's say this webpage is accessible on
On this webpage put a <img src="">

Step 2) Host a rest service on that returns a PNG image for the above url (

Step 3) Setup CORS such that allows request from

Step 4) Access the above webpage using Firefox 47 or later.

Important Notes: The same scenario works perfectly in Firefox 45 ESR, Chrome 51, IE 11 but not in Firefox 47 or later.

The exact headers exchanged are below:

Request Headers:
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:50.0) Gecko/20100101 Firefox/50.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache

Response Headers:
Access-Control-Allow-Headers: accept, content-type, token, cache-control, x-requested-with
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Type: image/png;charset=utf-8
Date: Wed, 27 Jul 2016 13:30:09 GMT
Server: Apache-Coyote/1.1
Transfer-Encoding: chunked
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1

From my investigations FFOX 47 sends a "Accept: */*" request header for the above <img src=..." instead of an "Accept: "image/png, */*, ...." header that is sent by FFOX 45. 

If I manually change the request header to "image/png" in the FFox inspector, network tab, using "edit and resend" button then the request is done correctly. 

Actual results:

The image is not rendered.

Expected results:

Image is rendered correctly.


2 years ago
Severity: normal → critical
OS: Unspecified → Windows 7
Priority: -- → P1
Hardware: Unspecified → x86_64
The Accept header change seems to be a result of bug 1249474
Blocks: 1249474
Severity: critical → normal
Component: Untriaged → Networking: HTTP
Priority: P1 → --
Product: Firefox → Core
Hi ltrifoi, it sounds like your server is misconfigured. It should be able to respond with an "image/png" asset when the Accept header is "*/*".
Hey Mike - I thought OP was saying that it did respond with an image, we just didn't render it. At least the response header in comment 0 has a image content-type
Flags: needinfo?(miket)
Oh, hmm. I missed that.

ltrifoi, can you confirm that an image is sent but it's just not rendered in the case of sending "*/*"? A screenshot of the network panel of the devtools would be helpful as well (or a public link to a server) -- thanks!

Flags: needinfo?(miket) → needinfo?(ltrifoi)

Comment 5

2 years ago
Yes, I confirm that the image is sent but it's just not rendered.

Comment 6

2 years ago
Actually, let me double check that and I'll also attach the network panel screenshots :)

Comment 7

2 years ago
I've double checked. Indeed it was a server misconfiguration. Sorry for wasting your time.
Thanks for filing the bug. Even if it turns out to be nothing, it's better to make sure :)
Last Resolved: 2 years ago
Flags: needinfo?(ltrifoi)
Resolution: --- → INVALID
No worries, thanks for the report!
You need to log in before you can comment on or make changes to this bug.