Wednesday, July 24, 2013

SVG images not visible in the browser

While I was using some SVG images in one of my projects, we observed that the images though included were not visible in the browser and some warning was shown in the console.

You need to add the following to the web.xml:
<mime-mapping>
<extension>svg</extension>
<mime-type>image/svg+xml</mime-type>
</mime-mapping>