Copied to clipboard

Flag this post as spam?

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


  • npack 51 posts 297 karma points
    Aug 22, 2024 @ 21:50
    npack
    0

    v14.2.0 - How to get Media Url in Typescript from Media Key (Backoffice)?

    Back in v13 angularJs to render a media image in a custom block view we used the 'mediaItemResolver' filter something like this:

    {{mediaItem = (block.data.myMediaProperty[0].mediaKey | mediaItemResolver); ""}}
    
    <img src="{{mediaItem.mediaLink}}" />
    

    Now that we have custom block views in v14.2.0 (yay!) I'm scrambling to recreate some custom block views as extensions with typescript and they're working great except for media-images but I'm not sure what the equivalent would be in v14-land.

    Does anyone know if there is a typescript umbraco utility to convert media keys to url paths?

Please Sign in or register to post replies

Write your reply to:

Draft