In Sitecore 8.1, there is a tiny but annoying glitch in the matrix, where SVG files are not allowed in the Media Library.
But do not worry, the fix is easy. Go to your /App_Config/Sitecore.config, find the /sitecore/mediaLibrary/mediaTypes/mediaType section, and add the SVG section yourself:
<mediaType name="SVG" extensions="svg"> <mimeType>image/svg+xml</mimeType> <forceDownload>false</forceDownload> <sharedTemplate>system/media/unversioned/image</sharedTemplate> <versionedTemplate>system/media/versioned/image</versionedTemplate> <mediaValidator type="Sitecore.Resources.Media.ImageValidator"/> <thumbnails> <generator type="Sitecore.Resources.Media.ImageThumbnailGenerator, Sitecore.Kernel"> <extension>png</extension> </generator> <width>150</width> <height>150</height> <backgroundColor>#FFFFFF</backgroundColor> </thumbnails> </mediaType>
MORE TO READ:
- Sitecore SVG support by Sitecore Corner
- How to compress SVG images from the Sitecore media library by Laub Plus Co
- Handling Sprites in Sitecore with SVG by CitizenSitecore
