Thursday, February 28, 2013

Image Handling in SharePoint 2013 and IE9/10 - GIF Image in Document Library not Showed

During a migration of a content database from a SharePoint 2010 to a brand new SharePoint 2013, everything seems to work fine except rendering of some GIF image were used in some pages.

Browsing the site with IE10 these images were not rendered. Using another browser these images were rendered correclty.

So I try to browse the "old" SharePoint 2010 with IE10 and images were rendered correctly.

SharePoint 2010 was served by Windows Server 2008R2 while SharePoint 2013 is served by Windows Server 2012 and IIS8.

The point is that when you create a new webapplication in SharePoint 2013 the IIS Virtual Server is created with two specific (local) HTTP Response Header.

One of this header (only IE9 and above versions is able to interprete this) is responsible of the behavior described:

X-Content-Type-Options: nosniff

Removing this custom header from every front-end webserver resolve the issues.

More info about this header can be read on MSDN at:

MIME-Handling Change: X-Content-Type-Options: nosniff

No comments: