Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am working on Umbarco 7.6.5 but not able to show image using umbraco.media(id of the image). is there something i am missing here.
They changed the way the Media Picker works.
This is how I did it:
var msPartner = @Umbraco.Media(root.GetPropertyValue("microsoftPartnerLogo").ToString()).Url;
Do not use dynamics :) Something like that is better:
var msPartner = Umbraco.TypedMedia(root.GetPropertyValue<int>("microsoftPartnerLogo")).Url;
Manish, did you solve the issue?
The problem can be with Property Value Converters, it's part of the core now.
And you can access images without calling Umbraco.Media
Just use CurrentPage.imagePropertyAlias.Url
Can you show the code that doesn't work for you?
An alternative approach to try is TypedMedia. You can use something like this within an src value of a img element...
Because it returns a IPublishedContent Media entity, you can also use other built-in properties listed here.
I am using arche type and taking image inside.
Please update on this?
Did you check this topic? https://our.umbraco.org/forum/using-umbraco-and-getting-started/85303-umbraco-76-and-media They are using Archetype as well.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted