Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Brian Milinski 42 posts 165 karma points
    Feb 23, 2023 @ 21:10
    Brian Milinski
    0

    Rendering Images in Umbraco 10 Razor View

    Hi,

    How do I put images into my Razor view files in Umbraco 10? @Modle.Value("image") returns a:

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

    What more would I need to pull in my image from the property editor?

    Thanks! Brian

  • Søren Kottal 713 posts 4571 karma points MVP 6x c-trib
    Feb 24, 2023 @ 07:57
  • Brian Milinski 42 posts 165 karma points
    Feb 24, 2023 @ 14:42
    Brian Milinski
    0
    Model.Value<MediaWithCrops>("propertyValue")
    
  • Brian Milinski 42 posts 165 karma points
    Feb 24, 2023 @ 14:19
    Brian Milinski
    0

    Awesome, thanks so much - stumbled across this a while after posting this and got things working properly.

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

Please Sign in or register to post replies