Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Alternative to <ac:image> for adding expandable images via Confluence Cloud API

Florent Lambrette August 22, 2025

Hi,
I'm trying to use the Confluence Cloud API to update a page using the endpoint with an HTML body:

/wiki/api/v2/pages/{page_id} 

So when I inject an image, I do it using the macro like this:

<ac:image ac:align="center" ac:thumbnail="true">
<ri:attachment ri:filename="my-picture.png"></ri:attachment>
</ac:image>

The picture has been uploaded previously with the endpoint : 

/wiki/rest/api/content/{page_id}/child/attachment


It works fine, but the problem is that the image is not in "thumbnail" mode, is too big or can't be expanded if i use the width property to reduce the size :


Screenshot 2025-08-22 at 21.58.25.png

If I try to edit it directly in the page, I get this message:

"This macro can’t be edited.
This macro was added to a page that was converted from the legacy editor.
It can’t be edited because it is now incompatible with the current editor."

Is there anything I can use instead of <ac:image>?
I just want to insert an image that can be expanded; otherwise, I’ll have to hardcode a width/height for each image in my code.







0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events