Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Posts
    28
    Plugin Contributions
    0

    Default img src not showing image

    Hi, I have been trying to work this out, I 'm sure its easy but it escapes me. Using ZC 1.3.8.
    In tpl_header.php I have added the line
    <img src="../../../images/header/blue.jpg" alt="blue"/>
    This is just below the logowrapper div.
    I am using Dreamweaver to do this and in the editor the image looks fine,

    But when I view it in the browser all I get is the alt text "blue" in a little place holder box.

    Why wont the image show in the browser

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: img src not showing image

    It doesn't show because you're trying to reference it from where the template file is located and not from where the file that ultimately includes the template (index.php in the site root) is located.

    It does show in Dreamweaver because that doesn't know who Zen Cart works and makes the same erroneous assumption that the image will be used where the template is located.

    This would probably work (in live though not in Dreamweaver)
    <img src="images/header/blue.jpg" alt="blue"/>
    But better still would be
    <?php echo zen_image('header/blue.jpg','blue') ?>
    (though that's not very helpful alt text)
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

 

 

Similar Threads

  1. No indication of image src not found
    By philip937 in forum Templates, Stylesheets, Page Layout
    Replies: 18
    Last Post: 14 Feb 2013, 09:21 AM
  2. how to modify the image SRC for image-handler images?
    By jason1116 in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 2 Sep 2009, 01:00 PM
  3. php variable within <img src>
    By jc8125 in forum Basic Configuration
    Replies: 2
    Last Post: 8 Jun 2009, 04:45 PM
  4. Replies: 0
    Last Post: 15 Jan 2009, 03:48 PM
  5. How to call MED image info on main page? Not an IMG but the path. Help please !
    By Yuchant in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 24 Sep 2007, 10:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg