confluence-publisher icon indicating copy to clipboard operation
confluence-publisher copied to clipboard

Image caption is rendered twice

Open morpfl opened this issue 6 months ago • 1 comments

An image caption can be added using a block title:

.Caption
image::../images/image.png[]

On the resulting Confluence page, the caption appears twice — once with automatic figure numbering and once without. This behavior is also visible in the official documentation (https://confluence-publisher.atlassian.net/wiki/spaces/CPD/pages/315883521/Images).

A possibility to choose between the two types of captions would be helpful so that not both of them are rendered.

morpfl avatar Oct 10 '25 11:10 morpfl

Hi @morpfl, thank you for reporting this issue. I suspect that this is due to a change in the way Confluence renders the title attribute of the image macro over time. In earlier versions, the title was not rendered as a caption text, but only as a tooltip on the image. That's why Confluence Publisher renders a separate caption element. It looks like this can be removed in favour of the title attribute, but it needs to be investigated if that is ok for Confluence Cloud and Server, and for both editor/renderers of Confluence Cloud.

As a workaround, you may use custom css to hide the additional caption element via the cp-image-title style class.

cstettler avatar Oct 10 '25 11:10 cstettler