ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Preview not showing the images

March 26, 2008 10:38am

Subscribe [2]
  • #1 / Mar 26, 2008 10:38am

    luftikus143

    22 posts

    Hi there,

    I was wondering why, when editing an entry and then clicking on “preview”, the images do not show up. I had a closer look, and saw that it had the “{site_url}” inside the URL, so not passing it through the generator (the template?).

    I guess what this means is that I shouldn’t use these “parameters” within the entries then?

    Thanks for a hint.

    Stef

  • #2 / Mar 26, 2008 10:53am

    Ingmar

    29245 posts

    As a rule, EE tags are meant to go in templates, yes, not entries.

  • #3 / Mar 28, 2008 3:52am

    luftikus143

    22 posts

    Ok, thanks for the clarification.

    But how comes that, when taking the “{site_url}” away, it still opens the images… and it uses the “system” folder within the URL whereas it shouldn’t? The image is here: URL/themes/images/image.png, but the Preview looks for it here: URL/system/themes/images/image.png

  • #4 / Mar 28, 2008 6:33am

    Ingmar

    29245 posts

    Using EE tags within entries can have unpredictable results. It certainly isn’t guaranteed to work. I suppose what happens is that, if you take away the {site_url}, your browser will treat the link as a relative one and search for the images in subdirectories of the current URL. As long as you are in your controlpanel, that is “system” (and images won’t be found), but on your published page the search starts at the root of the site, and thus finds the image folder.

    Try preceding it with a slash, ie using something like

    <a href="/images/foobar.png" alt="" height="" width="">

    to make it show up in both preview and published view.

  • #5 / Mar 28, 2008 6:43am

    luftikus143

    22 posts

    Great. Works. Thanks a lot!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases