So I just took a quick peek at our code…
We specified a resources directory for our images at top level in our atlassian-plugin.xml
:
<resource type="download" name="images/" location="/pocketquery-core/images"/>
In our CSS we are then able to just do this:
#pocketquery-header {
background-image: url("images/logo_bw_24.png");
}
And it works fine:
However I might be missing something here because our PocketQuery Administration is a custom Servlet, so there might be something else going on as well. Also in the browser the link actually contains the full URL so there could also be some kind of transformation happening on the CSS.
The thing is we don’t have specified any transformers explicitly other than the I18n one for this web-resource.
<transformation extension="js">
<transformer key="jsI18n"/>
</transformation>
Maybe you could try doing it the same way we are and use CSS? If that doesn’t work for you I actually think hardcoding the plugin key shouldn’t be too bad because it should never change anyway, right?