Syntax for adding image file ref within Space Tools > Look and Feel > Sidebar, header and footer
Asked by Steven Robinson:

I feel really silly asking such a basic question, but I was trying to improve our Confluence page when it comes to referenced header and footer images in the **Space Tools \> Look and Feel \> Sidebar, header and footer**areas.

As it stands, I was able to include an image file that scales when you zoom in or out by using the simplest form;

!image1.png\|height=100%,width=100%!

However, with this setup, whenever I create a new page, I must add these files to the new page or else I get an error message that the image doesn't exist.

So, I thought I read that I could refer to an image on a specific page within the same site key using:

!PageName\^image1.png\|height=100%,width=100%!

However this doesn't seem to be working.

The name of the top level page I would like to use is called "Welcome Screen" which shows in the URL as Welcome+Screen. So, my first inclination was to try using either single or double quotes around the name... but that didn't work.

I also tried Welcome+Screen as it appears in the URL... no luck there.

I am sure this is just a very basic Syntax problem, but I cannot figure out what I am doing wrong.

All I want to do is have the image files loaded in one place (figuring the top level of the site makes the most sense) and then have all of the header and footer images pointed to that one location so that I don't need to add an image file on every new page that I create.

Can someone please help me figure out what I am doing wrong? What is the proper syntax? Or if there is a better way to achieve the same end goal, I'm all ears!


Answers:
author: Alex Koxaras _Relational_
body: Hi [@Steven Robinson](/t5/user/viewprofilepage/user-id/4022035)

Height and width are supposed to be in pixels and not in percentage. Try this instead:

```
!PageName^image1.png|height=100!
```

comments: author: Steven Robinson
body: Thanks for the advice! However, I tried making the suggested change, but it didn't have any effect.

My image file currently appears just fine as long as a copy of the file is embedded in the page. So, it does not appear that the use of the percentage is the issue.

The syntax problem that I am trying to solve is how to properly reference a file posted on the top level page and have it recognize the image file stored there.

My top level page is titled "Welcome Screen" and no matter what I try, I cannot get it to work that the image file embedded there is found from all subordinate pages.

I still get the following error:

Unable to render embedded object: File (image1.png) not found.


author: Alex Koxaras _Relational_
body: Hi [@Steven Robinson](/t5/user/viewprofilepage/user-id/4022035)

TO my instance the following works as a charm:

My overview as a welcome screen with the image inside

![welcome01.png](https://community.atlassian.com/t5/image/serverpage/image-id/159376iA769190C45BCAB2A/image-size/large?v=v2&px=999 "welcome01.png")

In the tree, it's still named as overview

![welcome02.png](https://community.atlassian.com/t5/image/serverpage/image-id/159377i61B7D32ADFC21AFE/image-size/large?v=v2&px=999 "welcome02.png")

My settings:

![welcome03.png](https://community.atlassian.com/t5/image/serverpage/image-id/159374i219E0358C8D8663B/image-size/large?v=v2&px=999 "welcome03.png")

The result

![welcome04.png](https://community.atlassian.com/t5/image/serverpage/image-id/159375i911AE36A016CBA1D/image-size/large?v=v2&px=999 "welcome04.png")

Now, if the above setup yields an error, I would probably try to use another image. Your image could be corrupted or unsupported.


author: Steven Robinson
body: Well, I'm not sure why it didn't work before, but maybe the fact that I had both a height and a width specified with percentages was part of the problem... Anyhow, the winning syntax was:

!Welcome Screen\^image1.png\|width=100%!

So, thanks for helping me sort out this syntax nuance!


author: Steven Robinson
body: The part I hadn't been sure of was whether to include the space or not. So, the answer is yes, include the spaces in the title of the page that you want to use as the reference point within your site.


author: Alex Koxaras _Relational_
body: Nice!

Kindly mark the answer as correct to help other user in the community to find the right answers.

Cheers!


Tags: cloud

confluence-cloud