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 http://plantuml.com"
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.
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: https://community.atlassian.com/t5/Confluence-questions/plantuml-app-diagram-always-shows-broken-icon-on-page/qaq-p/1432529
Regards
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.