Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can't figure out image directory resource for themes


Have read lots of articles previous answers, but can't get this to work the way it's supposed to.

I have a theme that looks likes this:

 <theme key="my-theme" name="My Theme" class="com.atlassian.confluence.themes.BasicTheme"> 
<description>My theme description</description>
<param name="includeClassicStyles" value="false"/>
<resource type="download" name="default-theme.css" location="/includes/css/default-theme.css">
<param name="source" value="webContext"/> </resource>
<resource type="download" name="css/my-theme.css" location="css/my-theme.css"/>
<space-ia value="true"/>

So far so good, that works as expected. Now I want to add a resource for my images directory, which lives at the same level as my css directory. Everything I've read says I should then be able to reference the images as:

background-image: url(images/whatever.png)

However, I've tried including my resource between the <theme> tags:

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

but that doesn't work (why not?).  Using url(images/whatever.png) just gives a 404.

If I put the resource outside the <theme> tags, at the top level of the XML file, it sort of works, in that I then have to reference the images as:

background-image: url(../images/whatever.png)

otherwise it tries to find the images in the (non-existent) images sub-directory of the css directory—why is it looking there?

Any ideas why this isn't working like everything else says it's supposed to?

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

Welcome to the Confluence Holiday Workshop 🎁

Welcome to Confluence’s Holiday Workshop, where knowledge and collaboration collide! This year come celebrate the holidays with brand-new Confluence features to kickoff your new year, best practice...

427 views 11 31
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you