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.

Img src problem

January 31, 2011 3:33pm

Subscribe [3]
  • #1 / Jan 31, 2011 3:33pm

    Beazley66

    8 posts

    Hi all. Yes, another rookie question. I am having problems displaying an image on my profile page for our website. I have replaced a banner image and uploaded to my public_html/images folder.

    The following is the changed coding path

    <div id=“container”>

    <div class=“brownText” id=“header”></div>

    <div id=“logo”>http://www.elementltd.com/cb3/images/cbLogo.png
    </div>

      <!—top ends - unique content start—>

    <!—bottom start—>


    <div id=“banner”><img src=“http://[email protected]/public_html/images/profileTop.jpg” alt=“banner” width=“900” height=“160” >
    </div>


    The HTML was written by a designer and entries still point to his url, (ie elementltd.com. I added the img src pointing to an image called profileTop.jpg. but it will not show up. I plan on changing all of the img src info

    Any hints for a rookie, or am I banished for stupidity?
    Thanks

  • #2 / Jan 31, 2011 9:54pm

    Cheif

    626 posts

    Why are you using and FTP query to link to the image ?

    I tried accessing the image by pasting that link but no luck. Assuming your structure is based on that above try using:

    <img >

    Starting the href with a “/” tells the system to go right back to the HTML root then look for folder “images” then the file name.

  • #3 / Jan 31, 2011 10:06pm

    erier

    55 posts

    It’s tough to decipher exactly what’s going on here. Perhaps a couple of things to look into ...

    1. In your general configuration, do you have the correct URL for the base path of your site? This could be a possible cause to the broken image(s).

    2. Inside of any templates, assuming the base path of your site is correct in the general configuration settings, instead of typing the full URL path (ie: “http://www.site.com/images/image.jpg”), insert the tag {site_url}. So, your URL will now look like this: “{site_url}image/image.jpg”. You can also just place this tag anywhere on a page to see what the base URL of your site is. If it’s wrong, that could explain the issue.

    It seems like there’s probably an issue with the path’s in there somewhere. Hope this helps some ...

  • #4 / Jan 31, 2011 10:58pm

    Beazley66

    8 posts

    Thanks Lab Assistant and Summer student!Thank you for the responses

    My emergency is our former website designers lack of planning. Anyway, the URL path points to an ftp site becuase if i add path “http://cameronbrett.ehclients.com/Public_html/images/profileTop.jpg” instead, the Alt-“banner” image appears. My fear is that most of my website collateral, ie jpgs and pngs still point to the former webdesigners site (ie http://www.elementltd.com/cb3/images/profileTop.jpg). I’m new at this, by proxy, and apologize if I’m wasting your time.

  • #5 / Jan 31, 2011 11:20pm

    erier

    55 posts

    We’ve all been there ... no worries.

    So - I’ve checked into what you’re talking about.

    Currently, the banner image is here: http://www.elementltd.com/cb3/images/profileTop.jpg

    On your server, the alt image is here: http://cameronbrett.ehclients.com/images/profileTop.jpg

    ** notice above I did not include the /public_html/ directory. Also, note that /public_html/ should have a lowercase “p” in “public”. **

    The issue is that the image on elementltd.com/ is the one you would like, correct?

    Did the designer send you all of the assets for the site? It may be an arduous task, but you might have to take a little time to manually update all of the path’s in the HTML. With EE, don’t forget to use the tag {site_url}. This way, if a site moves back and forth from a local server to a live server, everything will still work as long as the base URL is set correctly in the EE configuration.

    Am I on the right track here?

  • #6 / Feb 01, 2011 12:51am

    Beazley66

    8 posts

    Hi FFI,

    Thanks again. Actually the header i want to use is off http://cameronbrett.ehclients.com/images/profileTop.jpg. I’m not sure what happened to the graphic, but I hope I can fix that. I expect that I will have to manually update all of the paths, and I will try to use {site_url}. I hope I can bother you for more tips. Thanks and will advise on progress

    Beazley66

  • #7 / Feb 01, 2011 1:17am

    Beazley66

    8 posts

    Yikes,

    I checked into my .jpg after correcting the img Src path, can’t figure out what has caused the header to appear corrupt. any thoughts FFI, here is the code as suggested:


    <div id=“banner”>http://cameronbrett.ehclients.com/images/profileTop.jpg

    </div>


    {embed="cb/menus}


    here is an capture. The header is a clean PS jpg:
    FFI, obviously I can’t figure out the graphics issue. Could it be Hex values determined in code?

  • #8 / Feb 01, 2011 4:00pm

    Ingmar

    29245 posts

    Header looks good to me: http://cameronbrett.ehclients.com/images/profileTop.jpg
    Did you upload in Binary mode?

  • #9 / Feb 01, 2011 5:08pm

    Beazley66

    8 posts

    Ingmar,

    My apologies for not posting that the problem was solved. I searched some archived threads on similar topics and found that, yes indeed, I needed to upload in Binary. I completed this this morning. Thank’s to the respondents above for all of the help earlier. I feel like I’m learning now.

    Beazley66

  • #10 / Feb 01, 2011 5:21pm

    Ingmar

    29245 posts

    No worries, and glad to see you’re all set. Please post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases