External images (linked via URL) resize/stretch vertically upon page edit in Confluence Cloud when placed inside layouts.

XMLWordPrintable

    • 1
    • Minor

      Issue Summary

      When external images (inserted via the "Image, Video, or File" macro using a URL) are resized within a Confluence Layout, the editor incorrectly overwrites the image's intrinsic width (media.attrs.width) with the user-selected display width (mediaSingle.attrs.width).

      Because the intrinsic height (media.attrs.height) remains unchanged, the aspect ratio is corrupted. Confluence uses this corrupted ratio to render the image, resulting in images that appear extremely tall and distorted (e.g., an image resized to 30px wide might render at its full original height of 640px).

      Steps to Reproduce

      1. Create a Confluence page and add a Layout section.
      2. Insert an externally hosted image using the Image, Video, or File macro (via URL) into one of the layout columns.
      3. Save the page.
      4. Edit the page and use the resize handle to change the image width.
      5. Save the page and observe the rendering.
      6. (Intermittent) Re-edit and save the page multiple times if the distortion doesn't appear immediately.

      Expected Results

      The image should maintain its aspect ratio based on its original dimensions, and only the display width should be updated in the mediaSingle node.

      Actual Results

      The media.attrs.width (intrinsic width) is overwritten by the mediaSingle.attrs.width (display width). This destroys the aspect ratio, causing the image to stretch vertically in the renderer.

      Workaround

      1. Users must delete and re-insert the affected image to restore the correct metadata
        or
      2. Manually fix the Storage Format through API/3rd party add-on
        or
      3. Avoid resizing external images within layouts if possible.

              Assignee:
              Unassigned
              Reporter:
              Vivin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: