cofoundry icon indicating copy to clipboard operation
cofoundry copied to clipboard

NotSupportedException: Image cannot be loaded - SVG

Open markchilton opened this issue 5 years ago • 1 comments

Hi guys

Currently the image picker will not allow the upload of svg file types. Is there a way around this or any plans in the future to allow the upload of svg image types?

Thanks

markchilton avatar Jul 31 '19 08:07 markchilton

File support is down to your imaging plugin, which will typically be Cofoundry.Plugins.Imaging.ImageSharp because it's the only one we've implemented so far, and this does not support SVG, but it should be reasonably easy for us to adapt it with some specific handling for SVG files.

As a workaround you could use the document asset repository which will allow most file types to be uploaded, but obviously that's not ideal. Alternatively you could customize the imaging plugin to your needs, it's a fairly lightweight wrapper, but you'll definately need to bypass the resizing code for SVGs.

HeyJoel avatar Jul 31 '19 19:07 HeyJoel

Fixed. Will be released with the .NET 8 update in v0.12.

HeyJoel avatar Mar 22 '24 18:03 HeyJoel