Styling <ac:image> element


I’ve created Static Content Macro which renders an image attachment of a page.

Macro returns a response in Confluence Storage Format, but I struggle with styling of <ac:image> element. According to docs one can use ac:style attribute on that element to include css style, but it does nothing - style is not applied to the image.

I tried to attach style element to Handlebars view to change style of a rendered element afterwards, but also without success - style element is not rendered in a page.

Does anybody have an experience with this please?

Many thanks in advance,


The documentation on that has been wrong for years:


Aah, that’s bad news :frowning:

So it looks the only way is an iframe in Dynamic Content Macro.

Anyway, thanks Jason.


UPDATE: actually it could be easily solved by undocumented macro Style:

<ac:structured-macro ac:name="style" ac:schema-version="1" ac:macro-id="868a65dc-a95f-412a-8abb-61e969908c30">
   <ac:parameter ac:name="import">https://link_to_your.css</ac:parameter>

Nice find. Unfortunately, it looks like that macro is now deprecated.