Forge Confluence Macro does not export images

I’m struggeling with Word or PDF export of macros containing images. Images are not exported at all. In PDFs, the images are missing at all and in Word, the images are not shown but a quare with an error from Word telling me that the image cannot be displayed.

To reproduce:
Create a UI Kit based Confluence Macro with Forge.
Change the index.jsx slightly to contain an additional image. I borrowed the “Atlassian-A” as a PNG and added it as an Based64 encoded inline image:

import ForgeUI, {
    render, Fragment, Macro, Text, Image
} from "@forge/ui";

const atlassianA = "iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAMAAADUivDaAAAAYFBMVEVHcEwlhP8mhP8kgv8AT88HX98kg/8jf/slhP8kgv8AUcsAUcwAUcwAUswAUcwAT88AT8sIXdcAUswAUMwMYtwAUMsOZeAAUcsde/YAUMsUbegZdPAAT8wadfATa+Ugffg+MYz3AAAAH3RSTlMAYP/DECChQOCDkHDA/7AwQP9g8L/g/4B40P+/UP/gykI1oAAAAbJJREFUeAGl0IcS2jAQhOFlVY7eq0x5/7cMio+YOpF8K5jq+eeT8J8N6DxMCyQjTHMkGWCYkFbGkDQyBqQyLAgjQ0grI5JGRiCtjBFpZThaGZ60MoS0MiLNDEczg7QyAmllCM2MAc2MEc2MSDPD0cxwNDMczYxIM2NEM2NEM2PE3gw/niBP2Jsxnc3mALBgX8ZytprNxgDAvozpKjfWAFxPxnK1yo1NAGJPxjYX7r8pMGAtQxF5ubGGZzVDEavWsQNcJUMR+9VjBxz7MLb7/b/IBoH1jOU+7xFZI9Yztm1BGydIHUMR6vgbCRjWMrZpn/b7TjLBoJIhKWlDMyfUMpqUG1pZ5b+vZEjSdbc5VzKaixa624xRxZBLyudFskUpQxH3aWOvjStqGHJp9wpBDaPRgkYU4isYcrvdLu+QfVpWMJp7IR9taCUnihiKyI53iaCY4drEh0NQyhDeqJFXSUApw5HsCp0kAYUMYbsPyBUoZLg2kE9beEQaFDEUoRW+QI4oYyhCIy9vIihjdIj3J7kAZQz3Fuga2VjEoO7zOgsUMeR7/x0BCH/MAfDydQGv+/3ZH0WQQ5Gb70g3AAAAAElFTkSuQmCC";

const App = () => {
    return (
        <Fragment>
            <Text>Hello world!</Text>
            <Image src={"data:image/png;base64," + atlassianA} alt={"An image"}/>
        </Fragment>
    );
};

export const run = render(
    <Macro
        app={<App/>}
    />
);

Now deploy and install. Create a page and add your Macro.

The “A” is displayed in edit mode, in view mode and it is displayed on a print-out via a web browser.
But if I use “Export > Word” or “Export > PDF”, the image is missing.

Is this a bug, a feature, works as designed or did I miss something?

  • Udo

Hi @UdoSiebrasse,

This is a known limitation of Forge and is tracked here: [FRGE-206] Forge apps don't render when exporting page to PDF / Word - Ecosystem Jira

Caterina