London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
You have to add support by your self. You can find code in this blog: https://world.episerver.com/blogs/Ben-McKernan/Dates/2015/7/supporting-svg-images/ :)
I am using ImageGalleryHandler to save the Image in the system. It works fine for image files (.jpg, .png etc.) However, it does not let me to add an SVG image to the system.
I have used the AddImage(Image) to add the image.
EPiServer.Community.ImageGallery.Image newImage = new EPiServer.Community.ImageGallery.Image(imageGallery, imageName, description, author, fileInput.PostedFile.InputStream) { Status = status, LanguageID = languageID }; newImage = ImageGalleryHandler.Instance.AddImage(newImage); //Throws FrameworkException for SVG images
When debugged I am getting this from FrameworkException (Screenshot) - https://1drv.ms/u/s!Ao3_PEzak8vNlU3KZiOeBNum9a81
It says "Image file could not be read, this could be because the file is corrupt or in an unsupported format"
I am sure that my file is not corrupted. And is this true? Are the SVG files not supported?