SVG image is not displayed in IE, Chrome

4

I'm trying to insert a vectorized image in SVG format, but I only see it in mozilla firefox, for IE and chrome it does not appear. I have searched for some documentation about svg in navigators, in many I see examples where shapes are drawn by placing coordinates, colors and the browser renders in svg image, but in my house I have that svg image in file.

Code:

   <div class= "spacioLogos">
         <p:graphicImage value="./images/logo_mexico.svg" width="120" height="55" styleClass="logoizquierda"/>

         <p:graphicImage value="./images/logo_mexico.svg" width="120" height="55" styleClass="img"/>                    

    </div>

The same thing is seen if I put the html img:

<img src="./images/logo_mexico.svg" width="120" height="55" class="responsive" />

Sample of how it is rendered in browsers: Mozilla Firefox:

google chrome:

internet explorer edge:

    
asked by Ventur 23.09.2016 в 18:31
source

1 answer

3

I am solved, I modified the web.xml of my application adding the type-mime of images svg, with this already they are shown in Mozilla firefox, IE, and Chrome.

    <mime-mapping>
        <extension>svg</extension>
        <mime-type>image/svg+xml</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>svgz</extension>
        <mime-type>image/svg+xml</mime-type>
    </mime-mapping>
    
answered by 23.09.2016 / 20:30
source