On my dev environment, I use the following to get the URL of a media picker property and it works successfully
var logoUrl = Umbraco.Media(Model.Brand.GetPropertyValue("logoHomePage")).Url;
And then
<img src="@logoUrl" alt="@siteTitle" />
On my deployed environment, I am getting src(unknown) - when I debug, the Model.Brand.GetPropertyValue("logoHomePage") is returning the correct ID but URL is returning nothing. No errors in the browser or the logs
EnablePropertyValueConverters is set to false on both environments
Umbraco.Media URL not being returned
I have recently upgraded to 7.10.5
On my dev environment, I use the following to get the URL of a media picker property and it works successfully
And then
On my deployed environment, I am getting src(unknown) - when I debug, the Model.Brand.GetPropertyValue("logoHomePage") is returning the correct ID but URL is returning nothing. No errors in the browser or the logs
EnablePropertyValueConverters
is set to false on both environmentsWhat would be stopping the URL beign returned?
Hi Mike
Try to use strongly typed medias like that:
Hi Mike
Did you solve the issue?
Oleksandr
is working on a reply...