I have both images and videos that i have uploaded ot the media section of my umbraco site.
Some of the document types on my website use media pickers to select the image or video that the user wants to display for a blog post etc.
How do i go about placing the media picker image/ video into my page? Is there a way to show the source of the image or video so i can put that into the src attribute of a img or video tag?
Currently when i call it using the add field section it shows an ID when the page is served up.
I'm a little confused as to what the media picker doesn't render the URL to the image. Isn't that what you would expect something like this to do? I've read the supplied link above and I'm just not sure I fully understand what it's suggesting. Any clarification would be much appreciated, as well as an answer as to why a tool used to place an image on a page only puts the ID there instead.
Displaying a Media Picker file.
Hi All,
I have both images and videos that i have uploaded ot the media section of my umbraco site.
Some of the document types on my website use media pickers to select the image or video that the user wants to display for a blog post etc.
How do i go about placing the media picker image/ video into my page? Is there a way to show the source of the image or video so i can put that into the src attribute of a img or video tag?
Currently when i call it using the add field section it shows an ID when the page is served up.
Kind regards.
Hi James,
Try to take a look at the documentation for the Media Picker.
http://our.umbraco.org/documentation/using-umbraco/backoffice-overview/property-editors/built-in-property-editors/Media-Picker
There are some good examples on how to get image or a file from a media picker, whether if you are using strongly typed razor or dynamic razor.
Hope this helps,
/Dennis
Hi James,
Did you managed to get the file path with the media picker, instead of just the ID
Looking forward to hear from you.
/Dennis
Thanks very much for your response!
I'm a little confused as to what the media picker doesn't render the URL to the image. Isn't that what you would expect something like this to do? I've read the supplied link above and I'm just not sure I fully understand what it's suggesting. Any clarification would be much appreciated, as well as an answer as to why a tool used to place an image on a page only puts the ID there instead.
is working on a reply...