Wednesday 8 June 2016

DOM7009: Unable to decode image at URL: [url] solved

Https enabled for my site and i was getting this error while trying to browse an image on IE 11, while it was working on chrome
perfectly. Initially i was not knowing what is the reason behind it. But i got something interesting.
I noticed the file was rename with its extension from .png to .jpg.

Change src attribute of image was not possible for me because i was not kowning how many times i did it.
SO i got a solution i disabled "nosniff" and worked for me:)

Changes in global.asax
//Response.Headers.Add("X-Content-Type-Options", "nosniff");

Changes in web.config
<!--To resolve the user image not displaying in the chat and in the header for IE 11--> 
<!--<add name="X-Content-Type-Options" value="nosniff"/>-->