Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Image Path Issue?

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 2091 Views
  • mjxxx
    Avatar
    2 Posts

    Image Path Issue? Link to this post

    I am experiencing a problem when attempting to insert an image into a page using the CMS.

    The image uploads without a problem and appears in the CMS and on my homepage without fail. However it seems that the image path is:

    img src="assets/folderName/imageName.jpg"

    This works fine for the homepage and for the CMS but if on a nested page the image does not show up as the browser is looking for the following:

    http://siteName.com/nested-page/assets/folderName/imageName.jpg

    rather than

    /assets/folderName/imageName.jpg

    Am I doing something wrong? Is anyone else experiencing this problem?

    How can I set all of my images to default to "/" THEN the image directory/folderName/imageName.jpg?

    Any help would be much appreciated. Apologies if this question has already been answered (or if the solution is simple).

    No - changing the image path in the CMS pop-up image properties window does not seem to work.

    THANKS!

  • Andy
    Avatar
    230 Posts

    Re: Image Path Issue? Link to this post

    You need to have <% base_tag %> in the head of your HTML template. See http://doc.silverstripe.com/doku.php?id=tutorial:1-building-a-basic-site#templates

    2091 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.