Umbraco has three initial, defaultMedia types: Folder, File, and
Image. When you want to add a File or Image to the set of items
available to your website, you add them to the Media tree and
reference them using various means.
You can create your own media type easily, as well as edit
existing types.� For example, the Image Media type (in theory) sets
values for commonly used properties whenever an image is uploaded
to the site--for example storing Width and Height information.� If
you wanted each image inyour site to have a defined alternate
title, you could add a Property of type Textstring to the Image
Media type, and the field would be there to be filled in when a
uploading an image, and referenced when displaying the Image.
Media, in a basic sense, are the things you create when 1) You
want to re-use the information frequently, or 2) You want to use
umbraco tools to reference and retrieve the information, or 3) You
want to allow site users or visitors to create content, but limited
to a specific structure.
Media is well supported by the umbraco Library API, and the
GetMedia method.� In physical terms, though, the storage of media
in the file system is not reflected in the Media Tree View.� You
can create an Images folder, and upload an Image to it in the GUI,
but in the file system it will be in nested, numerically named
folders.
This characteristic of Media items makes them difficult to
transfer between installations.� Each installation will have wanted
to give the media item its own index-identifiers, which will depend
on the state of the database.� Media is stored in the file system,
but the information about where to find the item you want is stored
in the database.
Even Images successfully uploaded will still not be seen by
referencing templates, XSLT or Macros until you have loaded the
item in the umbraco GUI.� This failure is silent.� If you can't see
an image, and think you should be, visit the node in the Media Tree
in the Media Section of the umbraco GUI.
Media is not a suitable section for storing code snippets.� Both
multi-line textboxes and richtext editors spur scripting exploit
warnings.� Code snippets can be stored as code islands under root
node.� See my
reuse package.