cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2: How to enable SVG image for category custom image upload

Magento 2: How to enable SVG image for category custom image upload

maHi All

 

I need to enable SVG image in upload for custom module.

I have tried all the solution which i have found.

 

Here is my code:

/etc/di.xml

<type name="Magento\Cms\Model\Wysiwyg\Images\Storage">
        <arguments>
           <argument name="extensions" xsi:type="array">
                <item name="allowed" xsi:type="array">
                    <item name="svg" xsi:type="string">text/html</item>
                </item>
                <item name="image_allowed" xsi:type="array">
                    <item name="svg" xsi:type="string">text/html</item>
                </item>
                <item name="media_allowed" xsi:type="array">
                    <item name="svg" xsi:type="string">text/html</item>
                </item>
            </argument>
        </arguments>
    </type>

Any idea? Help will be appreciated.