Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to create a page with base64 embedded image via REST API?

krivonos I'm New Here Jan 02, 2022

Hi all,

I use REST API to create pages in my Confluence server. It works fine for simple text, but if HTML text posted to the server contains base64 image, the POST operation finished well, but created page doesn't contain the image code. It is simply cut. Of course, created page doesn't show the image.

In the source it is like that:

<img src="data&colon;image/png;base64,iVBORw0KGg (many symbols here)=" />

Please, help.

1 answer

1 accepted

0 votes
Answer accepted

Yeah, that's not going to work.

It's a nice idea and I'd like it to work, but images need to be separate to content. Maybe upload as an attachment, then add the image to point to the attachment.

krivonos I'm New Here Jan 06, 2022

Yes, I did it. Now I have 3-steps page creation: 1) create a simple page just in order to know its ID; 2) upload images as attachments with already known page ID; 3) update page with its full content and references to attachments.

It isn't very nice and I would like to create a page with images in just one step, but I don't have another solution.

Anyway I have this workaround, it is better than nothing.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence Cloud

🏠 Say hello to the new Confluence Home!

Hi Atlassian Community, My name is DJ Chung, and I’m a Product Manager on the Confluence Cloud team. Today, I’m excited to share a new and improved version of Home. The new Home helps you ...

43,084 views 30 134
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you