Svg does not display in web viewer

Problem

Svg file is located in Manager and published to Web Viewer. Still svg cannot be displayed in the web viewer. Image is just not showing or a broken image icon is shown.

Solution

There are a few different things needed to make Svg files show correctly.

  • Check that image has a width and height in Manager. These need to be set in order for zoom and scale to work properly. If values are missing or set to zero, image may become 0 px high or wide and not show.

  • Check the size on disk of the Svg image. If image is very heavy, it may cause delays in transfer and timeouts to occur, causing image not to show.

  • Most browsers show svg images very well. But in some cases advanced Svg features can cause problems. Try saving in Svg tiny format of an older version to see if this is the problem.

  • Avoid any special characters in Id and Class objects. Even though the svg format allows special characters, some browsers consider an svg to be html code, and in html Id and class objects can only contain a-z and 0-9. Refer to the html standard for additional information on allowed characters in Attributes (Id / Class etc).
    To check this you will need to open the Svg file in a text editor (eg Notepad++) and search for the characters. It might even be needed to remove part by part of the image to find the location of forbidden characters.

Â