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
All i want is to be able to choose an image from the media library and place it into a specific div within my html.
I have tried the media picker, however, that doesnt work. The out put is
I have also tried the RTE and just select an image. Although it does upload the image, it places a p tag for some reason which i do not want.
What is the easiest and simplest way to upload images from the media section into a div.
Hi Jason,
Can you pasted a snippet showing how you were attempting to output the image in your div?
The Umbraco docs detail a couple of Razor snippets that you may find helpful: https://our.umbraco.com/documentation/Reference/Querying/UmbracoHelper/#working-with-media
If you need an image inside a div in the RTE the easiest way would probably be a macro: https://our.umbraco.com/documentation/Reference/Templating/Macros/
If you have a mediapicker property on your document type and using strongly typed models in your templates you would get a Umbraco.Web.PublishedModels.Image from the model of the document type.
Regards, Magnus
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Best way to insert an image
All i want is to be able to choose an image from the media library and place it into a specific div within my html.
I have tried the media picker, however, that doesnt work. The out put is
I have also tried the RTE and just select an image. Although it does upload the image, it places a p tag for some reason which i do not want.
What is the easiest and simplest way to upload images from the media section into a div.
Hi Jason,
Can you pasted a snippet showing how you were attempting to output the image in your div?
The Umbraco docs detail a couple of Razor snippets that you may find helpful: https://our.umbraco.com/documentation/Reference/Querying/UmbracoHelper/#working-with-media
If you need an image inside a div in the RTE the easiest way would probably be a macro: https://our.umbraco.com/documentation/Reference/Templating/Macros/
If you have a mediapicker property on your document type and using strongly typed models in your templates you would get a Umbraco.Web.PublishedModels.Image from the model of the document type.
Regards, Magnus
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.