Details
Greetings!
Recently I tried adding a .svg file to a Mock as it might be a neat way to track changes to such a file over time. However, instead of seeing my uploaded .svg as an 'image', all I can see is a spooky ghost.
Would it be possible to add support for this type of file in Mock, or are there reasons why that may not be a good idea?
Thanks in advance!
Answers
That would be hard - SVGs are unsafe (At least as of a few years ago) - https://secure.phabricator.com/T6445#157697
SVGs are in practice just tiny programs that run in the browser; Rendering one is not much different from allowing users to upload JS file and run that.
There are some possible ways to work around that - like filtering some of the content of the SVG or rendering it to PNG server-side, but all of them are complex and have their limitations.
It's really time for someone to specify a safe variant/alternative for SVG;