I am trying to upload an SVG logo for my Magento website, but it is not allowing me to upload an SVG file. It says that it is an unsupported file. Any idea how to resolve this?
Based on internet searches, it looks like Magento has disabled SVG support for security reasons. Is there any way I can re-enable it?
Thanks a lot
Best Answer
Your best bet is going to be editing your theme templates to include your svg image direclty. I think it would too much trouble to change this setting, and if it's a security concern by core developers, maybe it's best not to.*
To override theme file, add this file to your current theme:
Copy the contents from the same file located in the
Magento_Theme
module, and replace the image path your svg file.*I was curious why svg wasn't allowed. Apparently the reasoning was this:
source