how to use an attached svg image

Ralph van Ettten April 17, 2012

I attached an SVG image to a page in confluence but I can not use the image. I tried Insert -> Image but it does not reconize my SVG file as image.

How can I use SVG images? I saw there are plugins but they are really old. Is there a newer way?

3 answers

0 votes
AndreasS March 21, 2014

You can patch Confluence to show an SVG by

  1. Add the line
    image/svg+xml svg svgz
    to the file
    /opt/confluence/webapps/ROOT/WEB-INF/classes/mime.types
  2. Restart Confluence
  3. attach the image using
    !<Bildname>

    in Confluence Editor

Unfortunately, to use the two smallest image size reduction buttons or setting a smaller size then 300px does not work with Confluence richtext editor because Confluence tries to create a thumnail on server side which is currently not supported for SVGs (and the Confluence server will return a empty, broken image).

The workaround is to use the free Confluence Source Editor, use button "<>" and set the size of teh SVG to whatever you want (which should be perfectly ok for vector graphics).

(see also https://answers.atlassian.com/questions/222794/serve-svg-inline-in-confluence)

0 votes
LucasA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 29, 2012

Hello,

To get this working, you have to use SVG Image Macro, but it's not available in OnDemand Environment.

Lucas Lima

Atlassian Support

0 votes
LucasA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 29, 2012

Hello,

To get this working, you have to use SVG Image Macro(https://confluence.atlassian.com/display/DISC/SVG+Image+Macro), but it's not available in OnDemand Environment.

Lucas Lima

Atlassian Support

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events