Winter CMS resources and help articles

Simple and to the point. Optimized by the community.

Enable SVG support in Media Manager

0
by BennoThommo, last modified on February 4th, 2022

The Winter CMS team will be making SVG supported by default very soon, but in the mean time, if you wish to allow SVG uploads into the Media Manager, simply add the following to your config/cms.php configuration file:

    'fileDefinitions' => [
        'defaultExtensions' => [
            'jpg',
            'jpeg',
            'bmp',
            'png',
            'webp',
            'gif',
            'svg',
            'js',
            'map',
            'ico',
            'css',
            'less',
            'scss',
            'ics',
            'odt',
            'doc',
            'docx',
            'ppt',
            'pptx',
            'pdf',
            'swf',
            'txt',
            'ods',
            'xls',
            'xlsx',
            'eot',
            'woff',
            'woff2',
            'ttf',
            'flv',
            'wmv',
            'mp3',
            'ogg',
            'wav',
            'avi',
            'mov',
            'mp4',
            'mpeg',
            'webm',
            'mkv',
            'rar',
            'zip'
        ],
        'imageExtensions' => [
            'jpg',
            'jpeg',
            'bmp',
            'png',
            'webp',
            'gif',
            'svg',
        ],
    ],

Discussion

0 comments

We use cookies to measure the performance of this website. Do you want to accept these cookies?