Just ran my site in chrome and suprisingly it comes up with this warning for each of my .png images:
Resource interpreted as image but transferred with MIME
Ofcourse above solutions are perfect. Just to avoid warnings and for a clean console I done following change in my code. (that too only for ASP.NET Development Server) I written a extra handler for this:
PNGHandler.cs
class PNGHandler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
if(context.Request.HttpMethod == "GET")
{
string requestedFile = context.Server.MapPath(context.Request.FilePath);
FileInfo fileinfo = new FileInfo(requestedFile);
string contentType = "";
if (fileinfo.Exists && fileinfo.Extension.Remove(0, 1).ToUpper() == "PNG")
{
contentType = "image/png";
context.Response.ContentType = contentType;
context.Response.TransmitFile(requestedFile);
context.Response.End();
}
}
}
}
And added Http Handler in web.config under system.web