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

Unable to display PlantUML generated PNG files (reason below)

I am seeing a repeatable issue. When first inserting a PNG file generated by PlantUML into a confluence page, it appears to display the image correctly. After publishing the page, the image still appears correctly, but after refreshing/reloading the page, a gray box is shown with the message "Preview unavailable". 

After trying a number of different things with PNG files, the issue is related to either a `tEXT` or `iTXt` chunk in the PNG file. PlantUML inserts a `tEXt` chunk in the PNG file with the string: "keyword: copyleft Generated by"

 And the `iTXt` chunk contains the PlantUML source for the generated diagram.

If you remove these chunks by adding the command line option `-nometadata` to plantuml, the resulting PNG does not contain these chunks and Confluence seems to display it correctly.

1 answer

0 votes
Fabian Lim Community Leader Jan 10, 2022

Hi @Mark Morga

Welcome to the community!

Are you using a 3rd party plugin for this macro or are you inserting the pngs?

This post may be able to help you:


I'm not using a plugin. It occurs with either using the API to upload the image or when using the insert file or image when using the web editor. The issue is directly related to Confluence's inability to handle the `iTXt` chunk in the PNG format. I have a workaround which is to generate the PNG without the metadata added (which is stored in that `iTXt` chunk).

It is a bug in PNG handling in Confluence which should be addressed, but I posted the message to provide a workaround solution for any other users that may run into the same problem I did - to save some time. Thanks!

Suggest an answer

Log in or Sign up to answer
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,942 views 33 137
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