1) Image for use in the layout, with which the editors have nothing to do should be saved in a "images" folder on the disk in your umbraco project. Like you would save css files in a "css" folder and JavaScript files in a "script" folder.
2) Images that are used for content should be saved in the media section of Umbraco. To make upload of these images much easier you should encourage your editors to install the desktop media uploader, which is a brilliant package that makes uploading media a breeze :)
+1 to what Jan says regarding locations - although for CSS-related images I tend to put these in /css/images to avoid confusion in the filesystem.
Regarding using media items in your template, you should use the Media Picker on a document type, then when you go to select an image on a node, you can use umbraco.library:GetMedia(myImageProperty, 0)/Image to get the XML properties of the image you've uploaded into the Media library.
Umbraco images - best practices and use
I have several image types in my site:
1. Images for the layout - like logo, favicon, background images in the css.
2. Images which are content related - uploaded by site editors.
Where do I put each type of image and how do I reference it in the template to show in the website ?
thanks.
Hi olst
1) Image for use in the layout, with which the editors have nothing to do should be saved in a "images" folder on the disk in your umbraco project. Like you would save css files in a "css" folder and JavaScript files in a "script" folder.
2) Images that are used for content should be saved in the media section of Umbraco. To make upload of these images much easier you should encourage your editors to install the desktop media uploader, which is a brilliant package that makes uploading media a breeze :)
Hope this helps.
/Jan
Hi olst,
+1 to what Jan says regarding locations - although for CSS-related images I tend to put these in /css/images to avoid confusion in the filesystem.
Regarding using media items in your template, you should use the Media Picker on a document type, then when you go to select an image on a node, you can use umbraco.library:GetMedia(myImageProperty, 0)/Image to get the XML properties of the image you've uploaded into the Media library.
A good example is as follows:
Hope this helps,
Benjamin
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.