.jfif images is not processed by ImageSharp or ImageCropper
Using Umbraco 13
On our test server .jfif images is not processed by ImageSharp and the Content-Type header from the response is image/pjpeg and on our local machine it works as expected and we cannot figure out why.
Our test server runs on Windows Server 2019 with IIS 10.0.17763.1.
We have set the MIME Types in the IIS for .jfif to image/jpeg
We also tried to set mimeMap in the web.config under system.webServer => staticContent.
And last we also tried to register the jfif mimetype in the StaticFileOptions.
public static IUmbracoBuilder RegisterMimeTypes(this IUmbracoBuilder builder)
{
var mimeTypes = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
{
{ ".jfif", "image/jpeg" }
};
var contentTypeProvider = new FileExtensionContentTypeProvider();
foreach (var mimeType in mimeTypes)
{
if (contentTypeProvider.Mappings.ContainsKey(mimeType.Key))
{
contentTypeProvider.Mappings.Remove(mimeType.Key);
}
contentTypeProvider.Mappings.Add(mimeType.Key, mimeType.Value);
}
builder.Services.Configure<StaticFileOptions>(options => options.ContentTypeProvider = contentTypeProvider);
return builder;
}
.jfif images is not processed by ImageSharp or ImageCropper
Using Umbraco 13
On our test server .jfif images is not processed by ImageSharp and the Content-Type header from the response is image/pjpeg and on our local machine it works as expected and we cannot figure out why.
Our test server runs on Windows Server 2019 with IIS 10.0.17763.1.
We have set the MIME Types in the IIS for .jfif to image/jpeg![enter image description here](/media/upload/4673d58f-9b01-40f0-8fba-326552e1d005/iis-jfif.JPG)
We also tried to set mimeMap in the web.config under system.webServer => staticContent.![enter image description here](/media/upload/4cfea422-7575-4c0e-839e-38e65326a368/config-mimemap.JPG)
And last we also tried to register the jfif mimetype in the StaticFileOptions.
But nothing seems to work on our test server.
Do anyone have any idear?
is working on a reply...