[Solved] Unable to decode images in IE11
Added by aruru49 almost 9 years ago
Hi,
We are using lighttpd, We are getting issue for displaying images. in console, we are able to see that "unable to decode images". Browser is IE11.
Even though we are giving jpg file, but in the browser - F12 -> console -> network -> response body ->
Type: PNG is coming.
in Response - Headers: X-content-options : nosniff.
when we remove this, we are able to see the images.
Could you please help us, why this is showing PNG as Type, but our image is JPG type.
Thanks,
Vishal
Replies (3)
RE: Unable to decode images in IE11 - Added by nitrox almost 9 years ago
"nosniff" is of "X-Content-Type-Options" you´re missing the "Type".
On console do a file <file.jpg> or check for magic bytes:
.jpg: FF D8 FF
.png: 89 50 4E 47 0D 0A 1A 0A
Further you can check with "curl -I <url-to-jpg-file>" and check the "Content-Type" is jpg.
RE: Unable to decode images in IE11 - Added by aruru49 almost 9 years ago
on console, I am not able to see the magic bytes
It is saying " Failed to Load the image"
Regarding content Type: it is showing "image/jpeg"
My concern is "why the Type is showing as "PNG" in response body. everywhere it is jpg mentioned and got jpg only. is it with the IE11 parsing issue or lighttpd issue.
Thanks,
Vishal
RE: Unable to decode images in IE11 - Added by gstrauss almost 9 years ago
is it with the IE11 parsing issue or lighttpd issue.
Would you try to answer that question yourself by testing with another browser? (hint: not a lighttpd issue)
As nitrox suggested, verify the response headers and that the code is generating "X-Content-Type-Options", and not the incorrect "X-content-options"