Copied to clipboard

Flag this post as spam?

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


  • Jay Amang 13 posts 93 karma points
    Jun 20, 2022 @ 10:19
    Jay Amang
    0

    SVG using Media Picker

    Hi!, Appreciate your help here, I'm using media picker to upload SVG file and it is under a list view item. enter image description here

    But the svg file is not displayed in the front end of the website. enter image description here

    What Ive been doing wrong? Thanks in advanced.

  • Ambert van Unen 175 posts 819 karma points c-trib
    Jun 20, 2022 @ 10:44
    Ambert van Unen
    100

    What is printed in the source in the URL field? Perhaps the type of the image?

    If so you need to get the URL property of the value you retrieve with item.Value("image")

  • Jay Amang 13 posts 93 karma points
    Jun 20, 2022 @ 11:17
    Jay Amang
    0

    Hi Ambert, Thank you for your reply! My bad, there is no source in the URL field, I followed this one: https://our.umbraco.com/Documentation/Fundamentals/Backoffice/Property-Editors/Built-in-Property-Editors/Media-Picker/ and the svg file is now showing in the front end. enter image description here

    Results:

    enter image description here

    Thanks!

  • Ambert van Unen 175 posts 819 karma points c-trib
    Jun 20, 2022 @ 11:21
    Ambert van Unen
    0

    Nice that you fixed it! Cheers!

    Btw dont forget to add a null check for your link, as that can be null aswell ;-)

  • Jay Amang 13 posts 93 karma points
    Jun 20, 2022 @ 11:22
    Jay Amang
    0

    Yes, thanks for that one!

Please Sign in or register to post replies

Write your reply to:

Draft