I have a site that I have developed off-line and now loaded onto the production server. None of the images load on the server (despite being present in the appropriate directories). This applies to images loaded by css (for example:

.section-contact div#header {
background-image: url('/www.bernwodebenefice.com/images/contact_banner.png');}

It also applies to direct links from nodes. For example:

<img alt="" src="/www.bernwodebenefice.com/sites/default/files/StMaryDedication_1_20121202.jpg" style="width: 220px; height: 322px; margin-left: auto; margin-right: auto;">

(these samples are from the rendered code and are what I expected).

I do not have this problem with any of my other sites running on the same host. For example:

div#header {background-image: url(/sites/all/themes/Endurance80/css/images/e80_2013.gif); height: 263px; }

This works perfectly. And urls within the site work nicely using the same sort of link addresses.

I guess I have got some parameter somewhere not set right... (I copied .htaccess and php.ini from a working site to the failing site in the hopes it was a rewrite problem... nope)

Any thoughts?


  • Have you tried <img src="/sites/default/files/StMaryDedication_1_20121202.jpg"> Commented Jan 29, 2013 at 8:30

2 Answers 2


Have you tried

<img src="/sites/default/files/StMaryDedication_1_20121202.jpg">


.section-contact div#header {
  background-image: url('../images/contact_banner.png');

where images is a folder in your theme dir e.g: images/contact_banner.png relative to css file in e.g: css/style.css.

  • Thanks for the reply. I moved the css images to "sites/default/themes/<local-theme-name>/css/images" and modified the css to point to "images/xxxx_banner.png" (no leading slash). That had two effects: the banner images now work and all the rest of the images now work (even though I did not move them at all). Thanks for the support.
    – user13167
    Commented Jan 29, 2013 at 13:06

Why are your ulrs in your first two examples start with a slash? If you are not intentionally doing it, it can most probably be related with your settings.php. Check and make sure that your base_url is defined correctly.

  • Hi - thanks very much for the reply. Yes, the leading "/" was deliberate. As you can see above I have fixed the problem, but I will check out the settings folder as you suggest and see if that works - settings.php was the only file not transfered from the development site, so it could well hold a different base_url. Thanks for your support - I'll come back on this (but not till the end of the week)
    – user13167
    Commented Jan 29, 2013 at 13:08
  • Just to feedback on that last point about base_url. I tried this and it crashed the site. So I reset it rapidly and have not diagnosed further! (apologies for the delayed response - been ill).
    – user13167
    Commented Feb 7, 2013 at 19:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.