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...
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
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...
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.