SVG in Confluence

October 5, 2014

We wanted to host an SVG document with clickable links in a Confluence site.

SVG Images

First, we followed the instructions at

  • Go to your Confluence server and find the directory where Confluence was installed.
  • Edit /confluence/WEB-INF/classes/mime.types
  • Add a line with image/svg+xml svg svgz
  • Restart the Confluence application server.

This didn't work well enough for us - it let us embed SVG as images, but they were still presented as an image. We couldn't click any of our links.

HTML Macros

We got this to work using HTML macros. These are installed in Confluence by default, but are not enabled. They can be enabled using the instructions at

  • Click the Cog icon then select Add Ons.
  • Select System from the drop down and search for the Confluence HTML Macros add-on.
  • Expand the add-on and enable the html (html-xhtml) module.

Once this is done, you can attach SVG files as attachments and then embed them in the page using the ! shortcut when editing. Links work as expected.


Tags: svg confluence html