Search code examples
asp.netasp.net-mvcumbraco

How to display image in Umbraco?


how to display image from my Document Type (Category) info Templates view?

I tried to insert value but i get this

Umbraco.Cms.Core.Models.MediaWithCrops`1[Umbraco.Cms.Web.Common.PublishedModels.Image]
    
    

Can someone help?


Solution

  • If you have a MediaWithCrops type (which it looks like you do) you can use the following:

    NameOfMediaWithCropsVariable.MediaItem.MediaUrl();