Copied to clipboard

Flag this post as spam?

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


  • Christopher West 1 post 71 karma points
    Jun 01, 2017 @ 12:41
    Christopher West
    0

    Adding Media Picker to Template

    Hello!

    Very new to Umbraco. I've added a media picker to my Document Type (and selected an example image in the Content section), but I'm struggling with the necessary code in my template.

    I found some xsl code which will at least display an icon of an image, but not the image itself. Here's a snippet of the code that I think I need to edit:

            <img src="{$mediaNode/umbracoFile}" alt="[image]" height="{umbracoHeight}" width="{umbracoWidth}" />
    

    Can anybody tell me what I should replace the img source with? I defined my media picker as "portfolioImage1". When I try to add an Umbraco field to my template, I get this: @Umbraco.Field("portfolioImage1")

    But it doesn't work as the image source.

    Help!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

    Continue discussion

Please Sign in or register to post replies