Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-40672

Confluence File Preview does not allow setting custom size for SVG format

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      Confluence File Preview does not allow setting custom size for SVG format

      How to reproduce :

      1. Create a new page
      2. Upload .SVG image format
      3. Insert the .svg image using ! insert image macro
      4. Resize image in a specific width using the custom setting option

      Actual behavior:

      The image is broken or not showing properly

      Expected behavior:

      The image should display with the custom size

      Workaround

      Make the svg 301px large or bigger. It only breaks for sizes below 301px.

        1. saasu-logo.svg
          4 kB
          bradley_bristowstagg

            [CONFSERVER-40672] Confluence File Preview does not allow setting custom size for SVG format

            Thank you for taking the time to raise, comment or vote on this Bug. We regret to inform you that due to a limited number of reports and based on our current backlog of higher impact issues that we are closing this issue as Timed Out.

            If this issue is still impacting you on a recent version please feel free to comment with the affected version. Any further details you may be able to provide regarding reproduction or impact of this issue may help us better address this issue.

            Thanks again.
            Cheers,

            Confluence Product Management

            Adam Barnes (Inactive) added a comment - Thank you for taking the time to raise, comment or vote on this Bug. We regret to inform you that due to a limited number of reports and based on our current backlog of higher impact issues that we are closing this issue as Timed Out. If this issue is still impacting you on a recent version please feel free to comment with the affected version. Any further details you may be able to provide regarding reproduction or impact of this issue may help us better address this issue. Thanks again. Cheers, Confluence Product Management

            Yea once again it's that ac:thumbnail="true" directive that's being added.

            bradley_bristowstagg added a comment - Yea once again it's that ac:thumbnail="true" directive that's being added.

            In the latest connie, I see it works only for sizes larger than 300. The source code changes around that threshold as well.

            Broken version:

            <p>test</p>
            <p>&nbsp;</p>
            <p><ac:link><ri:attachment ri:filename="SVG_logo.svg" /></ac:link></p>
            <p><ac:image ac:thumbnail="true" ac:width="300"><ri:attachment ri:filename="SVG_logo.svg" /></ac:image></p>
            

            Working version:

            <p>test</p>
            <p>&nbsp;</p>
            <p><ac:link><ri:attachment ri:filename="SVG_logo.svg" /></ac:link></p>
            <p><ac:image ac:width="301"><ri:attachment ri:filename="SVG_logo.svg" /></ac:image></p>
            

            jonah (Inactive) added a comment - In the latest connie, I see it works only for sizes larger than 300. The source code changes around that threshold as well. Broken version: <p>test</p> <p>&nbsp;</p> <p><ac:link><ri:attachment ri:filename= "SVG_logo.svg" /></ac:link></p> <p><ac:image ac:thumbnail= " true " ac:width= "300" ><ri:attachment ri:filename= "SVG_logo.svg" /></ac:image></p> Working version: <p>test</p> <p>&nbsp;</p> <p><ac:link><ri:attachment ri:filename= "SVG_logo.svg" /></ac:link></p> <p><ac:image ac:width= "301" ><ri:attachment ri:filename= "SVG_logo.svg" /></ac:image></p>

            The video shows clearly that if I add an SVG to the page I am able to use any of the thumbnail buttons and Confluence will continue to render the image perfectly but when the user sets a custom size if fails.

            The video then shows that by looking at the code for the page (by using the builtin Source Editor) simply removing the [ ac:thumbnail="true"] directive, Confluence will then render the image correctly again.

            Surprisingly, if you look at the code for an image that has been resized using the inbuilt thumbnail buttons it does NOT add the [ ac:thumbnail="true"] directive.

            bradley_bristowstagg added a comment - The video shows clearly that if I add an SVG to the page I am able to use any of the thumbnail buttons and Confluence will continue to render the image perfectly but when the user sets a custom size if fails. The video then shows that by looking at the code for the page (by using the builtin Source Editor) simply removing the [ ac:thumbnail="true"] directive, Confluence will then render the image correctly again. Surprisingly, if you look at the code for an image that has been resized using the inbuilt thumbnail buttons it does NOT add the [ ac:thumbnail="true"] directive.

            From my initial support request:

            I've added SVG support to the Confluence MIME types and am now able to sucessfully insert/display SVG images in our pages. When selecting any of the Resize buttons the image resizes as expected, however if I manually modify the size then I get an error.
            Inspecting the code inserted into the page is seems like the //ac:thumbnail="true"// directive is the culprit.

            <ac:image ac:thumbnail="true" ac:width="200">
            <ri:attachment ri:filename="saasu-logo.svg"/>
            </ac:image>
            ^^^ - You get a broken image

            <ac:image ac:width="200">
            <ri:attachment ri:filename="saasu-logo.svg"/>
            </ac:image>
            ^^^ - You get a lovely SVG image. WIN

            See linked video for what happens. Have included an SVG also for your own testing.
            saasu-logo.svg
            link Confluence SVG Resizing Error

            bradley_bristowstagg added a comment - From my initial support request: I've added SVG support to the Confluence MIME types and am now able to sucessfully insert/display SVG images in our pages. When selecting any of the Resize buttons the image resizes as expected, however if I manually modify the size then I get an error. Inspecting the code inserted into the page is seems like the //ac:thumbnail="true"// directive is the culprit. <ac:image ac:thumbnail="true" ac:width="200"> <ri:attachment ri:filename="saasu-logo.svg"/> </ac:image> ^^^ - You get a broken image <ac:image ac:width="200"> <ri:attachment ri:filename="saasu-logo.svg"/> </ac:image> ^^^ - You get a lovely SVG image. WIN See linked video for what happens. Have included an SVG also for your own testing. saasu-logo.svg link Confluence SVG Resizing Error

              Unassigned Unassigned
              malog Mamerto Alog (Inactive)
              Affected customers:
              1 This affects my team
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: