var m = @Library.MediaById(@caseStudy.featuredImage);
Media image = new Media(m.id);
string imageUrl = image.getProperty("umbracoFile").Value.ToString();
It does work. I am assuming I must be missing something with my umbraco upgrade, but not sure what. Updated all the bin files to 4.7.1
Razor Media Error on Upgrade to 4.7.1
I just upgraded to 4.7.1 from 4.7.0 and my images are no longer showing. It was working fine before the upgrade.
A example of my razor script
<img itemprop="image" src="@Model.Media("Image").umbracoFile" class="thumb" />
the src is just a blank string and no error seems to being generated.
I have also tried using @Library.MediaById( @Model.Image).GetProperty("umbracoFile") but doesn't work either.
I am a bit stumped on this one. Has anyone got any idea what could be different betwen the upgrades?
Hi Nadia
Try doing something like this;
<img src="@imageurl" ....
Cheers
Evan
Thanks Evan, it still doesn't work. But when I do
It does work. I am assuming I must be missing something with my umbraco upgrade, but not sure what. Updated all the bin files to 4.7.1
is working on a reply...