Copied to clipboard

Flag this post as spam?

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

  • Aleksander 45 posts 205 karma points
    Apr 10, 2018 @ 11:32

    [SOLVED] Umbraco Upgrade 6 to 7, Updating Image references and property editors

    Hi guys.

    I've recently upgraded a website from 6 to 7. This website is a huge one with lots of articles with pictues. As you might be aware Umbraco completely changed how they handle pictures and Crops.

    This means, as far as i can see that i for each of my single properties that used a cropped picture have to reupdate the reference. It would be very painstaking to go through every single document on my site to check if the picture is correct, so right now im trying to explore my possibilites of coding my way out.

    Do you guys think this is possible? How have you guys solved issues with deprecated property editors in a huge umbraco update?


  • pranjal 75 posts 188 karma points
    Apr 10, 2018 @ 11:42

    See this umbraco documentation regarding image cropper and settings related to it.

    Or if you have to get more detail go to this site. This is very nice site to clear your doubts regarding imgare cropper and reference just go through.

  • Aleksander 45 posts 205 karma points
    Apr 10, 2018 @ 13:03

    Thank you for taking the time to reply Pranjal, but i think you're misunderstanding.

    I'm not asking how the new image cropper works. I'm asking if there is some neat solution to fix the references of your media in the media library, when changing from old image cropper to the new.

    After the update, when i query my Media gallery for a file with crops i'm getting XML like in the old ways. IE:

    <crops date="2015-05-11T00:00:00"><crop name="FullSize" x="0" y="0" x2="620" y2="297" url="/media/223304/oversigt3_FullSize.jpg" /><crop name="FocusBox - TwoThirds" x="0" y="0" x2="300" y2="135" url="/media/223304/oversigt3_FocusBox - TwoThirds.jpg" /><crop name="FocusBox - Third" x="0" y="0" x2="250" y2="146" url="/media/223304/oversigt3_FocusBox - Third.jpg" /><crop name="SectionImage" x="0" y="0" x2="278" y2="146" url="/media/223304/oversigt3_SectionImage.jpg" /></crops>

    if i then manually go and update the media item using the picture i'll get this:

     { "focalPoint": { "left": 0.5, "top": 0.5 }, "src": "/media/829729/dsc_0137.jpg", "crops": [ { "alias": "FullSize", "width": 940, "height": 450 }, { "alias": "FocusBox - TwoThirds", "width": 620, "height": 280 }, { "alias": "SectionImage", "width": 620, "height": 325 }, { "alias": "InnovationHeaderImage", "width": 1150, "height": 350 }, { "alias": "FocusBox - Third", "width": 300, "height": 200 } ] }

    I understand why i'm getting it, and i have over a 1000 pictures in my library which i need to reupdate with the correct picture - i'm wondering if anyone had the same challenge, and how they overcame it.

  • Aleksander 45 posts 205 karma points
    Apr 13, 2018 @ 09:43

    Well i solved my issue by writing a temp view, from the copy of my unupdated site, where it got the ID's and Values of the properties, wrote them to a file.

    Then in the new solution i matched the old ID's with the properties that had been deprecated, set them and saved+published them via the content service..

    Saved me from manually migrating 700+ pictures and 200+ properties

Please Sign in or register to post replies

Write your reply to: