Copied to clipboard

Flag this post as spam?

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


  • Arkida Kupe 3 posts 73 karma points
    Oct 19, 2018 @ 15:57
    Arkida Kupe
    0

    Can't get media image URL from Umbraco after upgrade from 7.3 to 7.6.13

    Hello all, I had an umbraco website version 4 and then I upgraded it. This was my upgrade process:

    1. 7.2.8-7.3
    2. 7.3-7.6.13

    After last upgrade, uploaded photos before version 7.3 did not appear anymore. Below is one of the partial view which I used to get images url and display them.

    enter image description here

    Now in the inspect element of browser images src is 'unknown' and the url is empty. Can you help me to pick up old images again because uploading them again is a waste of time?

  • Paul Seal 524 posts 2889 karma points MVP 7x c-trib
    Oct 19, 2018 @ 16:07
    Paul Seal
    1

    Hi In 7.6 they added Property Value Converters to Umbraco You can turn this off by going to UmbracoSettings.config file and looking for the property EnablePropertyValueConverters and setting it to false.

    Or you could change how you get the images using the new way:

    string imageUrl = Model.Content.GetPropertyValue<IPublishedContent>("headerImage").Url;
    

    Here is a blog post which has both ways on it:

    https://codeshare.co.uk/blog/how-to-get-the-file-path-of-a-media-item-in-umbraco/

    Cheers

    Paul

  • Arkida Kupe 3 posts 73 karma points
    Oct 22, 2018 @ 08:42
    Arkida Kupe
    0

    Hi, thanks for your response. I set EnablePropertyValueConverters to false but still no images are displaying.

Please Sign in or register to post replies

Write your reply to:

Draft