Copied to clipboard

Flag this post as spam?

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


  • Christian Hansen 34 posts 204 karma points
    Aug 26, 2019 @ 19:51
    Christian Hansen
    0

    Rotated images after upload from iphone

    Hello, i have a problem.

    I have a Umbraco site with members where a member can set a profile image. But when a member sets a image from an Iphone the image on the desktop and Umbraco are rotated. But when showed on iphone it seems fine. But when shown from desktop it is rotated 90 degrees to the left.

    I have read thats it´s because the image´s EXIF information. But have not found a solution. Can someone help with a solution?

  • Søren Mastrup 122 posts 563 karma points c-trib
    Aug 26, 2019 @ 20:10
    Søren Mastrup
    101

    Hi Christian,

    A simple fix could be to install tooorangey.uSpinMeRightRound.

    The package let’s you rotate the image from the backoffice.

  • Christian Hansen 34 posts 204 karma points
    Aug 26, 2019 @ 20:14
    Christian Hansen
    0

    Hello Søren,

    Thanks for reply.

    I have tried to install that. But then i get the following error:

    enter image description here

  • Marc Goodson 2141 posts 14344 karma points MVP 8x c-trib
    Aug 26, 2019 @ 20:14
    Marc Goodson
    0

    Hi Christian

    In the configuration for Image Processor /config/imageprocessor/processing.config

    there is a preserveExifMetaData option

    <processing preserveExifMetaData="true" fixGamma="false" interceptAllRequests="false" allowCacheBuster="true">
    

    and a plugin for AutoRotate:

    <plugin name="AutoRotate" type="ImageProcessor.Web.Processors.AutoRotate, ImageProcessor.Web" enabled="true" />
    

    but it depends if it's useful on other images to have the exif data preserved...

    ... so yes, uSpinMeRightRound allows you to rotate the image from the backoffice...

    regards

    Marc

  • Marc Goodson 2141 posts 14344 karma points MVP 8x c-trib
    Aug 26, 2019 @ 20:15
    Marc Goodson
    0

    Do you have the tooorangey.uSpinMeRightRound dll in your bin folder?

  • Christian Hansen 34 posts 204 karma points
    Aug 26, 2019 @ 20:16
    Christian Hansen
    0

    Hmm nope, its not there.

  • Marc Goodson 2141 posts 14344 karma points MVP 8x c-trib
    Aug 26, 2019 @ 20:17
    Marc Goodson
    0

    Did you install via Nuget or via backoffice?

    The dll is in the git repo:

    https://github.com/marcemarc/uSpinMeRightRound/tree/master/release0.1/nuget/lib

  • Christian Hansen 34 posts 204 karma points
    Aug 26, 2019 @ 20:18
    Christian Hansen
    0

    I installed via Nuget: install-package tooorangey.uSpinMeRightRound

  • Christian Hansen 34 posts 204 karma points
    Aug 26, 2019 @ 20:20
    Christian Hansen
    0

    I downloaded the dll from git. Works now, will test with image rotate now. For now thank you very much! :-)

  • Marc Goodson 2141 posts 14344 karma points MVP 8x c-trib
    Aug 26, 2019 @ 20:23
    Marc Goodson
    0

    That's strange!

    if I download the package from Nuget manually, and unzip the nupkg file.. it appears to be there in the /lib folder... but I'm not sure why that hasn't installed for you :-(

    ahh cool you've got rid of the error!

  • Jan A 59 posts 264 karma points
    Apr 23, 2020 @ 12:29
    Jan A
    0

    Does this plugin work with umbraco 8.5? Or will there be an update. I'm having kind of the same problems and the client can't re-save the images before uploading (but is ok doing it in the backoffice)

  • Marc Goodson 2141 posts 14344 karma points MVP 8x c-trib
    Apr 24, 2020 @ 06:03
    Marc Goodson
    0

    Hi Jan A

    I haven't updated the package for V8 - I was too slow!!

    and very shortly after V8's release as part of the 'Content App Competition', a more general Image manipulation plugin was created:

    https://our.umbraco.com/packages/backoffice-extensions/image-filter/#package-gallery

    and they've included the ability to rotate the image.

    So hopefully that will manage your rotatational image needs in the backoffice in V8! (albeit without the spinning crow)...

    regards

    Marc

  • Christian Hansen 34 posts 204 karma points
    Aug 26, 2019 @ 20:27
    Christian Hansen
    0

    It works, after rotate in backend the image shows fine both on mobile and desktop, just a little problem we have to rotate in backend.

    Best scenario would be if it could work instead of the need to rotate. But this i can use for now. Thanks to both of you! :-)

  • Jason Elkin 38 posts 351 karma points MVP 2x c-trib
    Aug 15, 2020 @ 16:35
    Jason Elkin
    0

    Just found an easy way to solve this.

    ImageProcessor has a plugin that can do this OOTB if you add "&autorotate=true" to the querystring.

    Too much of a faff to add to all your Image URLs? There's a way to simplify that. ImageProcessor has a validation event that you can hook into and modify the querystring for all requests to the site - effectively applying site wide defaults.

    ImageProcessingModule.ValidatingRequest += (s,e) => {
    
        var queryCollection = HttpUtility.ParseQueryString(e.QueryString);
    
        // don't override if already present in QS
        if (!queryCollection.AllKeys.Contains("autorotate"))
        {
            queryCollection.Add("autorotate", "true");
            e.QueryString = queryCollection.ToString();
        }
    };
    
  • Jason Elkin 38 posts 351 karma points MVP 2x c-trib
    Aug 24, 2020 @ 10:31
    Jason Elkin
    2

    Turned it into a package to make it easier:

    https://our.umbraco.com/packages/website-utilities/auto-auto-rotate/

Please Sign in or register to post replies

Write your reply to:

Draft