SVG (Vector image) not loading in Siteifinity CMS 9.1

Posted by Community Admin on 04-Aug-2018 10:41

SVG (Vector image) not loading in Siteifinity CMS 9.1

All Replies

Posted by Community Admin on 20-Sep-2016 00:00

In sitefinity,  We need to use SVG image as menu icons. but after applying this images inside the sitefinity, the SVG image was not loading. So how to make sitefinity enable  to use SVG image.

Already refer : 
www.sitefinity.com/.../svg-images
www.sitefinity.com/.../svg-files-in-css-not-loading

Also try with : 
add MIME Type of image/svg+xml in web config

Posted by Community Admin on 06-Oct-2016 00:00

Hi Anand,

I guess you put SVG image somewhere inside /App_Data/Sitefinity/WebsiteTemplates....

There are some weird Sitefinity handlers or modules return wrong Content-Type for SVG images.

You can easily fix that if you will add outbound rule in your web.config:

 

<outboundRules>
  <rule name="SVG" preCondition="SVG PC" patternSyntax="Wildcard" stopProcessing="true">
    <match serverVariable="RESPONSE_Content-Type" pattern="*" />
    <action type="Rewrite" value="image/svg+xml" />
    <conditions></conditions>
  </rule>
  <preConditions>
    <preCondition name="SVG PC">
      <add input="REQUEST_URI" pattern=".svg$" />
    </preCondition>
  </preConditions>
</outboundRules>

 

Or you can place your image in another folder outside of App_Data. In this case IIS should normally return Content type for your image

This thread is closed