I'm confused about how images work. I did the following:
1) On the media page, I create a folder called "limos", and I upload an image of a limo to the limos folder.
2) I go to the content tab, select the "limo service" page, go to the tab where I have my image property, and set it to the limo image I uploaded to the Media/limos folder.
3) I go to the limo service template and type:
@Model.Content.RoverPic
This results in a number (1345) where the image is supposed to be.
How do I add an image?
Hello,
I'm confused about how images work. I did the following:
1) On the media page, I create a folder called "limos", and I upload an image of a limo to the limos folder.
2) I go to the content tab, select the "limo service" page, go to the tab where I have my image property, and set it to the limo image I uploaded to the Media/limos folder.
3) I go to the limo service template and type:
This results in a number (1345) where the image is supposed to be.
So I try this:
This results in a broken image.
So I try this:
But again, just a broken image.
How do you add an image to your page?
Hi Gibran
You will need to pass the id you get brack from @Model.Content.RoverPic to the Umbraco.TypedMedia() method.
So it should be done like this
You can learn more here https://our.umbraco.com/documentation/Getting-Started/Design/Rendering-Media/
I hope this helps!
/Jan
Thanks Jan,
That works with the following minor adjustments:
is working on a reply...