How to display SVG images

Giovanni Tirloni July 2, 2019

I can add them just fine and they show correctly in the edit area. 

However, after saving, they show as "Broken Image".

1 answer

0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 4, 2019

Hello Giovanni,

Welcome to Atlassian Community. It's nice to meet you.

Can you tell me the size of your SVG image? It appears that there's a bug at the moment where resized SVG images below 301px are breaking:

  • CONFCLOUD-40672 Confluence File Preview does not allow setting custom size for SVG format

Please confirm if that appears to be the same issue you've run into.

Regards,

Shannon

Giovanni Tirloni July 4, 2019

I think the SVG images don't have a size per se because they are redrawn dynamically.

 

However, I've set the thumbnail to 800px here. I've tried other sizes (e.g. 511px large) with no luck.

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 5, 2019

Hello Giovanni,

You'll be able to change the initial size by editing the SVG file in a text editor. I've tested this with my own SVG, but actually even if I make it smaller than 301 I am not able to replicate the issue, so it might be something else with your SVG file.

Can you confirm that 100% of your SVG files, no matter what size, aren't able to be previewed or viewed directly on the page? Does this happen in more than one browser for more than one user?

Are you testing with the new editing experience (publish button at the top) or the old (publish button at the bottom)?

Regards,

Shannon

Giovanni Tirloni July 5, 2019

100% of my SVG files, no matter what size, are not being previewed directly on the page. They are previewed correctly in edit mode though.

This happens with Firefox 67 and Chrome 75.

The edit page shows the publish button at the bottom (Confluence Cloud).

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 5, 2019

Giovanni,

Thank you for confirming. Can you test it with the new editor as well and tell me if you have the same issue? To do this, when creating a page, select the New Editing Experience. I had a much better experience when embedding an SVG in the new editor, whereas the SVG wouldn't even preview inline using the old editor. I didn't get the same broken image as you but it was still much better with the new editor.

Regards,

Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events