Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Wilfried Jonker 6 posts 76 karma points
    Aug 16, 2017 @ 09:00
    Wilfried Jonker
    0

    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?

  • Dan Diplo 1554 posts 6205 karma points MVP 5x c-trib
    Aug 16, 2017 @ 11:44
    Dan Diplo
    0

    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.

  • Wilfried Jonker 6 posts 76 karma points
    Aug 16, 2017 @ 17:34
    Wilfried Jonker
    0

    I'am going to try to use the option format=jpeg. Maybe that this will help to resolve the issue.

  • [email protected] 406 posts 2135 karma points MVP 7x c-trib
    Aug 17, 2017 @ 06:18
    jeffrey@umarketingsuite.com
    0

    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

  • Wilfried Jonker 6 posts 76 karma points
    Aug 17, 2017 @ 06:50
    Wilfried Jonker
    0

    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

  • [email protected] 406 posts 2135 karma points MVP 7x c-trib
    Aug 17, 2017 @ 09:07
    jeffrey@umarketingsuite.com
    0

    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.

    enter image description here

    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.

  • Wilfried Jonker 6 posts 76 karma points
    Aug 17, 2017 @ 09:46
    Wilfried Jonker
    0

    Haha, thought so!

    See picture below, the file itself is stating JFIF. So this should be no problem.

    enter image description here

    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.

Please Sign in or register to post replies

Write your reply to:

Draft