Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Silverstripe cannot find image


Reply

5 Posts   847 Views

Avatar
Wezzlee

27 November 2010 at 7:36am Community Member, 28 Posts

I have been working wih Silverstripe very often but this is the first time that I face the following problem.

Info
Silverstripe: version 2.4.3.
OS: OS x 10.6.5
HTML editor: Dreamweaver CS 5
Browser: Firefox 3.6.12
Theme: blackcandy
Server: Mamp

I have created a homePage.ss file to have a homepage that is different than the other pages. In this file I have put a <img src> which has the following path (../images/about-amssuites.png). Normally this path should work but it does not display my image. I have even use the browse function in dreamweaver and selected the image and even that won't work. I have tried several paths but for me it is obvious there might be something else wrong. When i refer to an image in the layout.css stylesheet it can find the image without any problem. Who is able to help me. If you need more info please let me know.

Thank you,

wesley

Avatar
swaiba

27 November 2010 at 8:18am (Last edited: 27 November 2010 8:18am), Forum Moderator, 1796 Posts

I don't know why exactly that is not working, but could you specify the entire URL instead?

for example...
$BaserHref/mysite/images/imange.jpg

or...
$ThemeDir/images/imange.jpg

Avatar
Wezzlee

30 November 2010 at 8:22am Community Member, 28 Posts

Hi Swaiba the entire url is:

/Applications/MAMP/htdocs/silverstripe/themes/blackcandy/images/about-amssuites.png

Thanks,

Wesley

Avatar
swaiba

30 November 2010 at 9:04am Forum Moderator, 1796 Posts

ok, so that is in the theme directory... could you specify the image as...

$ThemeDir/images/about-amssuites.png

?

Avatar
Wezzlee

1 December 2010 at 8:34am Community Member, 28 Posts

Yes it worked. Thank you very much! :)