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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Silverstripe cannot find image


Go to End


5 Posts   1378 Views

Avatar
Wezzlee

Community Member, 28 Posts

27 November 2010 at 7:36am

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

Forum Moderator, 1899 Posts

27 November 2010 at 8:18am

Edited: 27/11/2010 8:18am

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

Community Member, 28 Posts

30 November 2010 at 8:22am

Hi Swaiba the entire url is:

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

Thanks,

Wesley

Avatar
swaiba

Forum Moderator, 1899 Posts

30 November 2010 at 9:04am

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

$ThemeDir/images/about-amssuites.png

?

Avatar
Wezzlee

Community Member, 28 Posts

1 December 2010 at 8:34am

Yes it worked. Thank you very much! :)