BookStack icon indicating copy to clipboard operation
BookStack copied to clipboard

Add `.svg` extension to supported image file extensions

Open tjone270 opened this issue 1 year ago • 3 comments

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.

tjone270 avatar Jan 16 '25 05:01 tjone270

Related to #1103

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

  • https://github.com/BookStackApp/BookStack/pull/3452
  • https://github.com/BookStackApp/BookStack/issues/1170#issuecomment-1136182504

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.

ssddanbrown avatar Feb 12 '25 17:02 ssddanbrown

With regards to security, I think this chapter from the SVG standard is useful.

thajohns avatar Sep 03 '25 19:09 thajohns

I deperately need this feature for migrating to bookstack. How about making it an opt-in until all the rest is figured out @ssddanbrown ?

morrolinux avatar Nov 05 '25 08:11 morrolinux