Can't add Macro Icon

Hey there.

I am currently working on a Macro-Plugin for Confluence and I am, once again, stuck.
I can’t seem to make an Icon appear in the macro browser. I thought it should be pretty easy… but no… all I get is a white field with “icon” written in the top left corner.

here is what I have right now:

	<web-resource key="copymacro-resources" name="copymacro Web Resources">

		<resource type="download" name="copymacro.css" location="/css/copymacro.css" />
		<resource type="download" name="copymacro.js" location="/js/copymacro.js" />
		<resource type="download" key="images" name="images/" location="images">
			<param name="content-type" value="image/png"/>

       <xhtml-macro name="copymacromodule" class="de.demicon.MacroParam"
		key="copymacro-key" icon="/images/pluginIcon.png">

I have tried so many different approaches that I can’t even remember.Any help would be greatly appreciatet.

Thanks in advance

1 Like

This is much harder than it ought to be, but once you’ve done it correctly for the first time, you just copy & paste.

I have my icon at:


Importantly, I have a resource which points to the images directory

<resource key="images" name="images/" type="download" location="images"/>

Then I can access the icon at:


Here’s part of an example atlassian-plugin.xml:

<atlassian-plugin key="${project.groupId}.${project.artifactId}" name="${}" plugins-version="2">
        <vendor name="${}" url="${project.organization.url}" />
        <param name="plugin-icon">images/gist-icon.png</param>
        <param name="plugin-logo">images/pluginLogo.png</param>
        <param name="atlassian-data-center-compatible">true</param>

    <resource key="images" name="images/" type="download" location="images"/>

    <xhtml-macro name="xhtml-gist-macro"
        <description key="me.davidsimpson.confluence.addon.gister.xhtml-gist-macro.desc"/>
        <category name="external-content"/>
            <parameter name="url" type="string" required="true"></parameter>

Others likely do it in different ways. This worked for me, so I’ve moved on :wink:


Thank you david, for the quick and correct reply. This worked for me. :snail:

For reference: what I did wrong was to put the resource download into a web-resource module. Might have worked if referenced differently/correctly.