Add .svg extension to supported image file extensions#5418
Add .svg extension to supported image file extensions#5418tjone270 wants to merge 1 commit intoBookStackApp:developmentfrom
.svg extension to supported image file extensions#5418Conversation
* Don't attempt to resize SVG images. * Add SVG mime type to image validation rules. * Add SVG mime type to accepted image types. * Add SVG mime type to the sniffer's safe list.
|
Related to #1103 Thanks for offering this @tjone270.
My issue comes down to SVG being a complex format that we can't assure wider support for (like in PDF exports) and which brings a wider range of expectations upon normal images (interactivity). Maybe the demand/value is enough for implementation regardless of compromise. |
|
With regards to security, I think this chapter from the SVG standard is useful. |
|
I deperately need this feature for migrating to bookstack. |
|
Thanks again @tjone270 for offering this, but I'm going to close this off as SVG support makes me a little too uneasy right now, when it comes to security and feature support, especially relative to demand (since would only cover a portion of the SVG demand, as some existing requests are for interactivity). It may be something to return to in the future, but it probably won't be anytime real soon so will close this pending PR. |
I've noticed that SVG images are not in the hardcoded list of supported image extensions. Having tested SVGs on my BookStack instance in the WYSIWYG editor these behave normally, so think it's worthwhile having this as an out-of-the-box supported image.