Reputation: 79
I am unable to get SVG images to show up in the "Select Image" box when a CMS user clicks the ellipse button for an image property on a page or block in Episerver. (Episerver 10.10.5.0)
The SVG images upload just fine, and they appear in the Assets Pane with the other images that have been uploaded. But when the user tries to select an image, only the other image types that are in the same folder appear.
I tried adding support via the model (Models\Media\VectorImageFile.cs) as suggested in the blog post here. When that didn't work, I removed VectorImageFile.cs and tried adding "svg" to the list of image extensions in Models\Media\ImageFile.cs:
[ContentType(DisplayName = "ImageFile", GUID = "88284fbf-9d34-469b-a259-716f8aac5529", Description = "")]
[MediaDescriptor(ExtensionString = "jpg,jpeg,jpe,ico,gif,bmp,png,svg")]
Both of those attempts compiled without issue, but did not make SVG images available to the user when selecting an image file for an image property of a page or block.
Hope I've provided enough information. I'm an Episerver noob (and a C# noob, tbh). Any guidance will be gratefully appreciated!
Upvotes: 1
Views: 812
Reputation: 79
OK. Here are the answers I found to my question.
What. A. Pain.
Upvotes: 1