Jump to:

23370 Posts in 18160 Topics by 2864 members

General Questions

SilverStripe Forums » General Questions » Silverstripe cannot find image

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

Page: 1
Go to End
Author Topic: 826 Views
  • Wezzlee
    Avatar
    Community Member
    28 Posts

    Silverstripe cannot find image Link to this post

    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

  • swaiba
    Avatar
    Forum Moderator
    1784 Posts

    Re: Silverstripe cannot find image Link to this post

    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

  • Wezzlee
    Avatar
    Community Member
    28 Posts

    Re: Silverstripe cannot find image Link to this post

    Hi Swaiba the entire url is:

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

    Thanks,

    Wesley

  • swaiba
    Avatar
    Forum Moderator
    1784 Posts

    Re: Silverstripe cannot find image Link to this post

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

    $ThemeDir/images/about-amssuites.png

    ?

  • Wezzlee
    Avatar
    Community Member
    28 Posts

    Re: Silverstripe cannot find image Link to this post

    Yes it worked. Thank you very much!

    826 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.