Joomla media Form Field Type

The media form field type provides modal access to the media manager to select an image or file. Users with appropriate permissions will be able to upload files. If the user is not authorised to view or add media, they will see an error page in the modal popup.

XML Field Definition

<field name="myimage" 
type="media"
label="Select Image"
directory="stories" />

This will open the media manager with the directory /images/stories/ already selected.

Additional Parameters

directory: This is the directory from which the user will be able to select a file. This attribute should be relative to the top level images/ folder. The default is images folder.

preview: It shows or hides the preview of the currently chosen image. The default value is true.

types: This defines what type of files can be selected. The default value is images,audios,videos,documents.