Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-79338

Inline images are converted to full size images upon calling the /rest/api/contentbody/convert endpoint

XMLWordPrintable

      Issue Summary

      When calling the contentbody/convert/ endpoint on storage format inputs containing an inline image with ac:inline="true", this attribute is lost in conversion and images are then rendered at full size. 

      Steps to Reproduce

      1. Create a page with an inline image
        1. You should notice that when inspecting the HTML of the page, the image is wrapped in a span with the class media-inline-image-wrapper
      2. Grab the storage format representation of the page. This should contain an ac:image tag with the {{ac:inline="true" }}attribute.
      3. Make a call to sitename.atlassian.net/wiki/rest/api/contentbody/convert/{format} endpoint with any valid format: view, styled_view, export_view, editor
      4. In the response, look at the value tag and observe that the image representation no longer contains any attribute marking the image as inline.

      Expected Results

      If converting to styled_view, the HTML should wrap the image with a span with the class media-inline-image-wrapper

      If converting to the other views, the image tag should contain the {{ac:inline="true" }}attribute

      Actual Results

      If converting to styled_view, the span with the class media-inline-image-wrapper is missing from the HTML

      If converting to the other views, the image tag does not contain the {{ac:inline="true" }}attribute

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

              Unassigned Unassigned
              7812e3f9fb71 Vinodh Nagarajan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: