Today I found that using the header "X-Content-Type-Options nosniff;" with the image cropper results in not rendering the image in Internet Explore. It gives nor problems in Chrome or Edge.
The strange thing is, when using the "X-Content-Type-Options nosniff;" directly on the image there is no problem to load in Internet Explorer. The problem starts when using the Image Cropper. In this particular case it is a jpg. Is it posible that the image cropper might transform the jpg into another images file format?
ImageCropper is powered by ImageProcessor. It has the ability to change the output format of an image, but only if you explicitly add a "format=png" or similar to the query string of an image URL.
which version of Umbraco are you working with and is this the case by the default Image Cropper?
And can you may be share the picture you're trying it with?
A while ago this issue got fixed (http://issues.umbraco.org/issue/U4-6873) and I don't think it's a problem anymore (we're not facing this problem currently). It could be that you're uploading a .jpg that actually isn't a .jpg, but .png. This would cause the no-sniff-header to break this functionality in IE.
Thanks for your reply. This might the the problem mentioned in case U4-6873. The Umbraco installation is on version 7.2.2. I don't feel like sharing the picture publicly but if you are interested I can sent it to you privately.
now you've got me really interested of course ;). You could sent it to me if you need some more help ([email protected]), but maybe upgrading your Umbraco install will fix it.
And you can also try to check it yourself. Just open your picture with Notepad and look at the first few characters and check if it matches your extension.
Here you see on the left a .png and on the right a .jpeg.
In older Umbraco installs every image that was upload create thumbnails, but those thumbnails were always of the format .jpeg, but in the header of the image it said .png. And that mismatch caused Internet Explorer to not display the image.
Problem rendering image in IE with nosnif header.
Today I found that using the header "X-Content-Type-Options nosniff;" with the image cropper results in not rendering the image in Internet Explore. It gives nor problems in Chrome or Edge.
The strange thing is, when using the "X-Content-Type-Options nosniff;" directly on the image there is no problem to load in Internet Explorer. The problem starts when using the Image Cropper. In this particular case it is a jpg. Is it posible that the image cropper might transform the jpg into another images file format?
ImageCropper is powered by ImageProcessor. It has the ability to change the output format of an image, but only if you explicitly add a
"format=png"
or similar to the query string of an image URL.See http://imageprocessor.org/imageprocessor-web/imageprocessingmodule/format/
NB. I've not had any issues with image crops in IE11.
I'am going to try to use the option format=jpeg. Maybe that this will help to resolve the issue.
Hi Wilfried,
which version of Umbraco are you working with and is this the case by the default Image Cropper?
And can you may be share the picture you're trying it with?
A while ago this issue got fixed (http://issues.umbraco.org/issue/U4-6873) and I don't think it's a problem anymore (we're not facing this problem currently). It could be that you're uploading a .jpg that actually isn't a .jpg, but .png. This would cause the no-sniff-header to break this functionality in IE.
Jeffrey
Jeffrey,
Thanks for your reply. This might the the problem mentioned in case U4-6873. The Umbraco installation is on version 7.2.2. I don't feel like sharing the picture publicly but if you are interested I can sent it to you privately.
Wilfried
Hi Wilfried,
now you've got me really interested of course ;). You could sent it to me if you need some more help ([email protected]), but maybe upgrading your Umbraco install will fix it.
And you can also try to check it yourself. Just open your picture with Notepad and look at the first few characters and check if it matches your extension.
Here you see on the left a .png and on the right a .jpeg.
In older Umbraco installs every image that was upload create thumbnails, but those thumbnails were always of the format .jpeg, but in the header of the image it said .png. And that mismatch caused Internet Explorer to not display the image.
Haha, thought so!
See picture below, the file itself is stating JFIF. So this should be no problem.
An upgrade is anyway a good idea. For now I have disabled nosniff for the media folder. It is not the ideal solution, but it works.
is working on a reply...