Skip to content Skip to sidebar Skip to footer

Svg Not Showing In Object Tag After Publishing To Web

I am able to get the SVG files to display using the object tag (img tag didn't work nor did background-image property) while running in debug mode using MS Visual Web Developer 201

Solution 1:

I resolved the issue. I had to add the .svg mime type to the application's web.config file. The following code was added to web.config and now all scalable vector graphics display in both the image tag and object tag in debug as well as released.

<configuration><system.webServer><staticContent><mimeMapfileExtension=".svg"mimeType="image/svg+xml" /></staticContent></system.webServer></configuration>

I found the solution here: https://serverfault.com/questions/359904/how-to-configure-iis-for-svg-and-web-testing-with-visual-studio

and here: http://www.codeproject.com/Tips/439273/Viewing-SVG-and-other-HTML5-content-when-debugging

Post a Comment for "Svg Not Showing In Object Tag After Publishing To Web"