Display Image from Media Library in Umbraco 7

后端 未结 8 2065
野性不改
野性不改 2021-02-04 00:22

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)

8条回答
  •  故里飘歌
    2021-02-04 00:59

    Inside the template

    umbraco:Macro runat="server" language="cshtml"

    img src="@Model.MediaById(Model.photo).umbracoFile" alt=""/
    

    /umbraco:Macro

    ---Model.photo =photo is a alice name

提交回复
热议问题