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
Hello There, I'm new to Umbraco and I'm trying to use media picker on my site but for some reason the value is always null or empty.
I followed the steps in here but when inspecting the html code i get the following results:
<img class="img-fluid" src="" style="background-image: url('')" alt="">
Here is my code:
@{ Layout = "Master.cshtml"; var image = Model.Value<IPublishedContent>("mainImage"); if (image != null) { <img src="@image.Url" class="img-fluid" style="background-image: url('@image')" alt="" /> } }
In the Backoffice i added my image in Media first and i did click save and publish.
I'm running on version 8.14.1
Hi Yousif,
try:
<img src="@image.Url()" class="img-fluid" style="background-image: url('@image.Url()')" alt="" />
If you are using the new MediaPicker 3 check out this page
https://our.umbraco.com/Documentation/Fundamentals/Backoffice/property-editors/built-in-property-editors/Media-Picker-3/
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Working with Media Picker
Hello There, I'm new to Umbraco and I'm trying to use media picker on my site but for some reason the value is always null or empty.
I followed the steps in here but when inspecting the html code i get the following results:
Here is my code:
In the Backoffice i added my image in Media first and i did click save and publish.
I'm running on version 8.14.1
Hi Yousif,
try:
If you are using the new MediaPicker 3 check out this page
https://our.umbraco.com/Documentation/Fundamentals/Backoffice/property-editors/built-in-property-editors/Media-Picker-3/
is working on a reply...