Styling <ac:image> element

Hi,

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,

Jiri

The documentation on that has been wrong for years: [CONFSERVER-38676] Embedded Image ac:style attribute being lost - Create and track feature requests for Atlassian products.

Also: [CE-118] - Ecosystem Jira

Aah, that’s bad news :frowning:

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

Anyway, thanks Jason.

Jiri

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>
</ac:structured-macro>

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