Copied to clipboard

Flag this post as spam?

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


  • Jeroen Visschers 3 posts 73 karma points
    Mar 15, 2023 @ 14:12
    Jeroen Visschers
    0

    ImageProcessor getCropUrl returns 'wrong' cropped image

    Goodday Umbracians,

    I'm running into an issue with the ImageProcessor and Images that have an orientation set in their meta-data. In our example we have a slider with landscape images that are cropped media/1004/my-image.jpg?anchor=center&mode=crop&width=940&height=560&rnd=133221602160000000

    One specific image (taken with a (i)Phone) is not cropped correctly. It looks like the width & height are exchanged. After further inspection we found that in the meta data (EXIF) for this image, there is a specific entry: Orientation : rotate 90 .

    If I strip al the meta data from the image, the crop width & height are correct.

    Has anybody else encountered this, and is there a solution to solve this in Umbraco, instead of asking the client to remove metadata from their images?

    I have tried using settings in de processing.config and as a querystring, but both didn't work.

    I use the following:

    Umbraco 7.12.5, ImageProcessor 2.5.6

  • GunsRoseSS 12 posts 82 karma points
    Mar 15, 2023 @ 15:06
    GunsRoseSS
    0

    Have you tried setting preserveExifMetaData to "true" and metaDataMode to "All" in your processing.config (one of the first lines)? That is what worked for me.

  • Jeroen Visschers 3 posts 73 karma points
    Mar 23, 2023 @ 07:58
    Jeroen Visschers
    0

    At first I tried it, it didn't work. Later I found out that there was a difference between prod and dev in the processing.config.

    In dev the config file was empty, so imageprocessor was not working (and adding preserveExifMetaData didn't do anything.

    Took me a while to figure that one out, but now it is working. I have to use preserveExifMetaData=false, zo the exif is ignored.

    Thanks for your help

Please Sign in or register to post replies

Write your reply to:

Draft