Skip to content

Conversation

tjone270
Copy link

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.

* 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.
@ssddanbrown
Copy link
Member

ssddanbrown commented Feb 12, 2025

Related to #1103

Thanks for offering this @tjone270.
This is a path I've thought about and tested before:

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).
Edit: Also need to think the security implications of displaying SVG images, especially when accessed direct via browser in public storage. Quite likely a range of security concerns.

Maybe the demand/value is enough for implementation regardless of compromise.
Think I need to dwell on this, I might ask about this via the issue for feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants