I would like to update graphic symbolize in geoserver style from svg to png, gif or jpg. However, the symbol doesn't display when I view in openlayer. Svg symbol works fine. Here is my code:
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" xmlns:se="http://www.opengis.net/se">
<NamedLayer>
<se:Name>map_seed_source_site </se:Name>
<UserStyle>
<se:Name>map_seed_source_site </se:Name>
<se:FeatureTypeStyle>
<se:Rule>
<se:Name>Single symbol </se:Name>
<se:PointSymbolizer>
<se:Graphic>
<se:ExternalGraphic>
<se:OnlineResource xlink:type="simple" xlink:href="http://www.opendevelopmentcambodia.net/wp-content/themes/opendata/images/seed-sources-legend.gif" />
<se:Format>image/gif</se:Format>
</se:ExternalGraphic>
<se:Size>100 </se:Size>
</se:Graphic>
</se:PointSymbolizer>
</se:Rule>
</se:FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
When you tried, have you also changed this line? from
<se:Format>image/gif</se:Format>
to
<se:Format>image/png</se:Format>
I'm also not sure if you can use <size>
tag with non-vector graphic files. So try to change the gif to PNG and also to remove the size. The SLD will use the original size of the PNG. I'm not 100% sure it helps but it is worth a try...