This should be something embarrassingly simple, but I can\'t get it to work: I\'d simply like to display an image that was uploaded to the Umbraco Media Library (Umbraco 7.1.1)
Having had such an unexpectedly hard time for something that I would have thought would be easy, this snipped worked for me.
@if (Model.Content.HasValue("OtherImages"))
{
var otherImages = Model.Content.GetPropertyValue>("OtherImages");
foreach (var image in otherImages)
{
if (image != null)
{
}
}
}
Much of the other postings did not work for me, but I think that the API has changed a bit. I'm using Umbraco 7.6.1. I'm not sure whether the null check is necessary, but it certainly won't do any harm.