I have images missing between pages I have edited the page.tpl.php file to include an image in the header and another in the footer of the page.

When I am in the home page of the site ie. '/product_range' the images are there. If I navigate to another part of the site ie. '/node/1' they are missing. Coincidently this is actually the same page just referenced differently in the url.

In the page.tpl.php template I have referenced the image like this:

&lt;img src="&lt;?php global $base_path; print path_to_theme(); ?&gt;/images/brand_icons.gif" alt="" /&gt;


This is the actual path to the images:
'\sites\all\themes\MySubTheme\images'

This is most frustrating... Thank you in advance for your assistance.
The return path from path_to_theme() doesn't have a slash at the front of it and so becomes relative to the path you're currently at. That would probably explain why it works for pages in the root of your site, but not those that are at least one directory down.

You should be able to fix it easily by adding a forward slash to the start of the image path:

&lt;img src="/&lt;?php print path_to_theme(); ?&gt;/images/brand_icons.gif" alt="" /&gt;


On another note, make sure you fill the alt in...people with screenreaders will thank you for it :)