You would generally use the media section for images and documents that you want the site editors to maintain and change themselves. e.g photos that are part of a photo gallery.
For images that are part of your actual design I would put them in a seperate images directory (there is no images directory by default in a new Umbraco solution so you will need to create it) and refer to them directly in the CSS and template files.
Wait, now I realized I had another question. You mean to add a folder under the Web Site and not under "Developer" or "Settings", correct?
If that is the case, do I have to create a new document type that is "folder" because I can't seem to simply add a folder when I right click on my site?
We actually mean to add the files for the layout in a folder on the file system. Nothing to do with the umbraco back office. So in the Umbraco folder on your file system add a 'Images' or 'Layout'. or any name you prefer somewhere in that folder. I use /Umbraco/Images.
Just a little thought now when were talking about where to access and put our images. Umbraco can automatically create thumbnails and different sizes of an image when I upload it. I have a number of customers who wants to use these images in the editor. Why am I not allowed to use these? or is there some clever way to achieve this?
It's a compnent that will re-create images on-the-fly from the original image. It does lots of other clever stuff and has great caching capabilities as well but in the simplest use it can easily create various sizes of an image.
ImageGen is not the solution to the problem. The users wants to be able to choose the different versions of the image from the TinyMce editor (Insert Image Popup). I know that ImageGen automatically changes the image to the right weight when the user changes the size by dragging the image but that is not good enough. It might seem "picky" of me/user but since I have heard this from several customers I feel that I have to mention it here.
Under what circumstances would a user be choosing an image to insert into TinyMCE? Would it be possible to control the approach so that the images were inserted through a media picker and only the text was editited in TinyMCE?
Alternatively, you could write some XSLT to scan the contents of the TinyMCE editor, find the image and replace the source with the imagegen script path. This would ensure that the image that was output on the site was a properly resized image instead of a stretched one.
That is one approach but then the Html editor looses a lot of its functionality. If a user shouldnt be able to insert an image through the "Insert Image"-button in the editor then theres no possibility to let text wrap around images and have a dynamic amount of images inside an article. Or am I wrong?
I could have a field where the user puts his image and use a mediapicker to get the size that I want, and probably that is the best way, but not what my customers are trying to achieve.
How to use Media
Being new to Umbraco, it is unclear to me as to how or when to use "Media" type?
I quickly created a new Doc type and template and tied them together with a CSS file.
However, I have images that I want to include in my site. Do I upload those to the "Media" folder or what do I do with them?
Thanks,
Eric
Hi Eric,
You would generally use the media section for images and documents that you want the site editors to maintain and change themselves. e.g photos that are part of a photo gallery.
For images that are part of your actual design I would put them in a seperate images directory (there is no images directory by default in a new Umbraco solution so you will need to create it) and refer to them directly in the CSS and template files.
Cheers
Paul
Will an image be changed by editors? --> Media
Want a random image? --> Media
Do you add the media once and nobody but the developer(s) should touch it? --> A seperate image folder.
All layout related images --> Image folder
That's how I do it at least :)
Guys, that was exactly what I was looking for. Thank you for the reply!
Wait, now I realized I had another question. You mean to add a folder under the Web Site and not under "Developer" or "Settings", correct?
If that is the case, do I have to create a new document type that is "folder" because I can't seem to simply add a folder when I right click on my site?
We actually mean to add the files for the layout in a folder on the file system. Nothing to do with the umbraco back office. So in the Umbraco folder on your file system add a 'Images' or 'Layout'. or any name you prefer somewhere in that folder. I use /Umbraco/Images.
Just a little thought now when were talking about where to access and put our images. Umbraco can automatically create thumbnails and different sizes of an image when I upload it. I have a number of customers who wants to use these images in the editor. Why am I not allowed to use these? or is there some clever way to achieve this?
ImageGen will solve your prolem froad:
http://www.percipientstudios.com/
http://www.percipientstudios.com/media/5549/imagegen%202.0.1%20documentation.pdf
It's a compnent that will re-create images on-the-fly from the original image. It does lots of other clever stuff and has great caching capabilities as well but in the simplest use it can easily create various sizes of an image.
<img src="/umbraco/ImageGen.ashx?image=/media/watch.jpg&width=200" />
To get the specific path to an image, brose to it in the media section, click on the thumbnail and copy the address from the address bar.
If you want to resize an image that the user has picked as a node you can use something like:
<xsl:element name="img">
ImageGen is not the solution to the problem. The users wants to be able to choose the different versions of the image from the TinyMce editor (Insert Image Popup). I know that ImageGen automatically changes the image to the right weight when the user changes the size by dragging the image but that is not good enough. It might seem "picky" of me/user but since I have heard this from several customers I feel that I have to mention it here.
Hi Froad,
Under what circumstances would a user be choosing an image to insert into TinyMCE? Would it be possible to control the approach so that the images were inserted through a media picker and only the text was editited in TinyMCE?
Alternatively, you could write some XSLT to scan the contents of the TinyMCE editor, find the image and replace the source with the imagegen script path. This would ensure that the image that was output on the site was a properly resized image instead of a stretched one.
Cheers,
Kev
That is one approach but then the Html editor looses a lot of its functionality. If a user shouldnt be able to insert an image through the "Insert Image"-button in the editor then theres no possibility to let text wrap around images and have a dynamic amount of images inside an article. Or am I wrong?
I could have a field where the user puts his image and use a mediapicker to get the size that I want, and probably that is the best way, but not what my customers are trying to achieve.
Im making a slider, here i have 5 pics that i put in Folder inside Media.
Inside the folder i made 5 files and uploaded each pic that wanted to use in the slider, then Im linking it to the template with:
<img src="url to the image, in one case fexample media/1272/slide01.jpg" />
If im then updating one of the files with another picture will not the img src be the same.
Then, here is my quistion.
Is it any way I can write something like this <img src="media/folder/name" /> ???
And then it is updating automatic, and i dont have to change the last text slide01.jpg (media/1272/slide01.jpg" /) to the picture im updating it with.
is working on a reply...