Media libraries support the following types of images: bmp, gif, png, jpg, jpeg, tiff, tif. These types of image files can be displayed on your site by default.
The system detects audio and video files based on their MIME type (audio types starting with the audio/ prefix and video types starting with the video/ prefix). For successfully detected audio and video file types, the system renders appropriate HTML5 markup. The types of files that can be previewed or played on your site therefore depend on the web browser (modern HTML5 web browsers typically support one or more of the ogg, mp4, or webm video codecs, and mp3, wav, or ogg audio codecs).
Allowing custom file types to be added into media libraries
You can allow custom file types by modifying the site's web.config file (or properties of the MediaControl.ascx control). The system can recognize and process any media types, if you have the right player for the given file type. By specifying the file types in the web.config keys, the automatic detection and support of media files is disabled and only the specified file types are recognized as image/audio/video files by the system.
Example of configuring custom detection of media file types
To allow only media files of selected types to be added into media libraries:
Add the following keys into the appSettings section of your web.config file.
<add key="CMSImageExtensions" value="bmp;gif;ico;png;wmf;jpg;jpeg;tiff;tif" /> <add key="CMSAudioExtensions" value="wav;mp3" /> <add key="CMSVideoExtensions" value="mp4;ogg" />
- Save the web.config file.
Allowing upload of selected files into media libraries
- Open the Settings application.
- Navigate to the Content -> Media category.
- Add the selected file extensions into the Media file allowed extensions setting (separated by semicolons).
- Save the changes.
Was this page helpful?