Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
the code I am using is var theImage = @item.GetValue("boxImage");
but it's rendering just the media number not the image. This code is used in the archetypes not from partialviews or macros.
Content pickers don't store the image URL, they store the media item id - you need to fetch the media item and use the URL property.
Something like this:
var imageUrl = Umbraco.Media(item.GetValue("boxImage")).Url;
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
unable to render an image through archetype properties
the code I am using is var theImage = @item.GetValue("boxImage");
but it's rendering just the media number not the image. This code is used in the archetypes not from partialviews or macros.
Content pickers don't store the image URL, they store the media item id - you need to fetch the media item and use the URL property.
Something like this:
var imageUrl = Umbraco.Media(item.GetValue("boxImage")).Url;
is working on a reply...