I am currently using ImageField for uploading images to my site. I discovered today that ImageField does not allow for uploading SVG. The reason being that with SVG files there are potential security issue, SVG files can contain malicious javascript. I could use FileField, but I am wondering if there are ways to use ImageField, or if I use FileField how do I insure that the SVG file is safe?
I am currently using ImageField for uploading images to my site. I discovered today
Share
You could potentially write a sanitizer on the file, but it might take a bit of work. Take a look at Sanitizing SVG and maybe the whitelist in html5lib