Having Trouble Getting Images To Show Up

by dv8
14 replies
  • WEB DESIGN
  • |
I am certainly not an expert at web design. I just know enough to get a basic site up when needed.

But I am having a VERY difficult time getting images appear to on my sites.

I know you are supposed to put all images in an image folder so it makes things easy. Then "call" that image when needed with the appropriate code.

I thought I was doing things right. But clearly I'm not.

I think my main problem is that I am hosting several sites under one hosting account. So I think that is throwing me off.

Do I create only ONE image folder for all of my sites or do I need to create one for each site? I have one for each site, just in case. But I'm still having issues.

I use Dreamweaver MX2004.

I am currently getting this message when I attempt to put an image on my page.

"The file <whatever the file name is> is not on your local disk and therefore cannot be opened."

What does that mean exactly?? Local disk??

Also, when I try to use a picture from my computer, I get the following message (which I understand why I'm getting since the pic is not in any of my site folders)...

"The file is outside of the root folder of site "Site Name" and may not be accessible when you publish the site. Would you like to copy the file there now?"

I select "Yes". But I still don't see any pics on my site. I just get an outlined box with a small red X in it where the pic would be.

I know it may be difficult to know what the problem is without seeing my site. But are there any typical mistakes people may make with this type of thing? Maybe I am missing something simple.

Any help is GREATLY appreciated as this is driving me nuts!

Thank You!
#images #show #trouble
  • Profile picture of the author danolund
    Hey dv8, first question - can you find the images on your hosting account?
    cpanel>> File manager >> image folder for the site you are working with.
    Sometimes it is just easier to use the full url to the image after the scr:"image url" in your code. But it is possible to just use the images folder in the site folder such as scr:"./images/mypic.gif. does any of this make sense? Having read your post a little better sounds as though you need to ftp images to your web host, sounds like the site is trying to pull them from your local drive???

    Dan
    Signature
    {{ DiscussionBoard.errors[1373369].message }}
  • Profile picture of the author edynas
    Banned
    Sounds to me that you are looking at a local copy of the site you are working on and haven't uploaded the images or that you reffer to them in your html to local files. That will mean that you have something like file D:\ etc etc

    Can you copy paste the code you have for the image so something like <img src="the location of the file" >
    {{ DiscussionBoard.errors[1373386].message }}
    • Profile picture of the author dv8
      Originally Posted by danolund View Post

      Hey dv8, first question - can you find the images on your hosting account?
      cpanel>> File manager >> image folder for the site you are working with.
      Sometimes it is just easier to use the full url to the image after the scr:"image url" in your code. But it is possible to just use the images folder in the site folder such as scr:"./images/mypic.gif. does any of this make sense? Having read your post a little better sounds as though you need to ftp images to your web host, sounds like the site is trying to pull them from your local drive???
      Hey Dan,

      Yes, I can see the images folder in cpanel. And yes, I am pretty sure what you said makes sense, haha.


      Having read your post a little better sounds as though you need to ftp images to your web host, sounds like the site is trying to pull them from your local drive???
      Originally Posted by edynas View Post

      Sounds to me that you are looking at a local copy of the site you are working on and haven't uploaded the images or that you reffer to them in your html to local files. That will mean that you have something like file D: etc etc

      Can you copy paste the code you have for the image so something like <img src="the location of the file" >
      Yeah, seems that is my problem. But I don't understand why....

      "The file <file name> is not on your local disk and therefore cannot be opened."

      What does that mean? Local disk...doesn't local just mean my computer??

      And I don't understand why it still doesn't work when I try to use a picture and DW asks me if I want to copy it to the right folder and I say yes but it still doesn't show up.

      And I don't get this, I am in remote view in DW. The image file shows up there. Then I drag and drop it into my page and get that error message about not being on my local disk. But then if I double click the file name it "gets" the file. AFTER that, I can drag and drop the image onto my page.

      But it still shows up as a blank box with a red X online.
      {{ DiscussionBoard.errors[1373570].message }}
  • Profile picture of the author edynas
    Banned
    can you copy paste the raw html of your page or just the part with the image so we can see what's going on
    {{ DiscussionBoard.errors[1373589].message }}
    • Profile picture of the author dv8
      Originally Posted by edynas View Post

      can you copy paste the raw html of your page or just the part with the image so we can see what's going on
      Here is the page I am testing it on.
      http://www.imfoundations.com/imagetest.htm

      Code:
      <p><img src="/images/30day_guarantee_blue.gif" width="146" height="146" /></p>
      <p><img src="/public_html/images/3Lambos.jpg" width="487" height="329" /></p>
      I've been playing around with some settings....hence the folders being different before the file names. Seems obvious that is where my issue is.

      Now that I look at it this way, the code should be a full URL, right?

      Btw, what's the difference between the folders public_html, public_ftp, and www?


      Thanks for the help so far.
      {{ DiscussionBoard.errors[1373626].message }}
      • Profile picture of the author edynas
        Banned
        Originally Posted by dv8 View Post

        Here is the page I am testing it on.
        http://www.imfoundations.com/imagetest.htm

        Code:
        <p><img src="/images/30day_guarantee_blue.gif" width="146" height="146" /></p>
        <p><img src="/public_html/images/3Lambos.jpg" width="487" height="329" /></p>
        I've been playing around with some settings....hence the folders being different before the file names. Seems obvious that is where my issue is.

        Now that I look at it this way, the code should be a full URL, right?

        Btw, what's the difference between the folders public_html, public_ftp, and www?


        Thanks for the help so far.
        Using your setup how you have it here there should be 2 images in this location on your hosting account

        1. image called :30day_guarantee_blue.gif
        location : Index of /images

        2. image called :3Lambos.jpg
        location : Index of /images

        so if you goto the full url of the image it would be
        http://www.imfoundations.com/images/3Lambos.jpg
        but that gives a 500 server error. which in my book means you are having a .htaccess file in there maybe for restricting hotlinking/direct access

        Looking at the source of your code that is online tho your reffer to the image like this <img src="http://www.coloredcowmarketing/public_html/images/30day_guarantee_blue.gif"> and that is not good as you are mixing two things. server path and url. Either do it by full url ic http://mysite.com/images/image.jpg or by relative path. But first make sure the images are indeed in the folder called images on your site as you are using a differnt domain name in the image src also and I do not know if that was on purpose or not

        Edwin
        {{ DiscussionBoard.errors[1373822].message }}
        • Profile picture of the author dv8
          Got it working!!


          Originally Posted by edynas View Post


          Looking at the source of your code that is online tho your reffer to the image like this <img src="http://www.coloredcowmarketing/public_html/images/30day_guarantee_blue.gif"> and that is not good as you are mixing two things. server path and url. Either do it by full url ic http://mysite.com/images/image.jpg or by relative path.

          Edwin
          This did the trick. Which you guys mentioned before. But for whatever reason, when I went to mysite.com/images/ and saw it that way, it made more sense to me.

          Then I just copy and pasted the full URL into the code in DW. Or, just the /images/image.jpg

          Again, for whatever reason it made sense once I looked at my images folder online.

          THANK YOU to all of you.
          {{ DiscussionBoard.errors[1375025].message }}
          • Profile picture of the author asgraphixs
            I just wanted to post a quick reply even tho the problem seems to be solved, I was seeing the same messages in dreamweaver before and noticed that when I set my site up, in the "site manager" I had forgot to set the default image folder. Dreamweaver kept telling me that my image folder wasnt on my site and would just drop images in the root folder. Also in the site manager there is an option to make all links relitive to the document or the site root. I always choose documents because I get a more complete path, you can choose either one when ever you make a link or image if you want to have all document, but one relative to the site. You change it in the very bottem of the window opens when you add an image. Thats off topic, but the point is if your image links do not work, check and have set the default image folder for the site and try making all link relative to the document, It will save you alot of time editing all those image links.

            Oh and another way that you can make sure your links are good, in design view if you dont see the image, click on it and find the image in your site and click on it again, it will correct the link, that is already there. Pointing directly to the image
            {{ DiscussionBoard.errors[1379889].message }}
  • Profile picture of the author trumpetblast
    Originally Posted by dv8 View Post

    Do I create only ONE image folder for all of my sites or do I need to create one for each site?
    Definitely create one for each site. And make sure that folder is saved in the primary directory for that particular site. So, you should have something like:

    /public_html/mysite1/images
    /public_html/mysite2/images
    /public_html/mysite3/images

    I am currently getting this message when I attempt to put an image on my page.

    "The file <whatever the file name is> is not on your local disk and therefore cannot be opened."

    What does that mean exactly?? Local disk??
    As the other posters have indicated, it sounds like either you have not uploaded the images to your hosting account, or you are trying to view the version of your html file that is stored on your hard drive rather than your hosting account, or perhaps the html file on your hosting account has the image location incorrectly pointing to the location of the image on your hard drive.

    Basically, here's what you need to do. First, go to your hosting account and find the location of the html page you want to edit. Where is it stored? It should be stored in the folder for the particular site. So, following the example above, it should be stored in:

    /public_html/mysite1/

    Now, let's assume that it is stored in the correct folder, and that you're going to be editing the index.html file.

    Open that file and find the first image link on the page. It will look like this:

    <img src="something.jpg">

    To get the image to show up correctly, you need to do 2 things. First you need to make sure that your image is actually uploaded to your hosting account and in the proper folder.

    So, it should be stored in: /public-html/mysite1/images/

    Second, you need to have the image link pointing to that location.

    So, if you're trying to show the "apple.jpg" image, you should have:

    <img src="public-html/mysite1/images/apple.jpg">

    However, you can save yourself some typing because, since your index.html file is already stored in /public-html/mysite1/, you don't have to type all that. Instead your link can simply be:

    <img src="images/apple.jpg">

    Lastly, it's important that your capitalization is correct. So, if it's "Images" instead of "images", use the correct one. Also watch out for ".JPG" instead of ".jpg"; use the wrong one and the image won't show up.
    {{ DiscussionBoard.errors[1373620].message }}
  • Profile picture of the author dv8
    trumpetblast - Thanks. Very helpful post.


    It's 10 am where I'm at and I've been up all night. Which is probably part of the problem.
    Speaking of, heading to bed in a few. Staying up all night is really starting to hit me now.

    So thanks again to you guys for being patient and helping me out. I appreciate it. Perhaps I'll see what the heck is wrong later on with some fresh eyes.
    {{ DiscussionBoard.errors[1373644].message }}
  • Profile picture of the author LazyMogul.com
    This can be the problem... "public_html"

    ---- /public_html/images/30day_guarantee_blue.gif
    ---- /public_html/images/3Lambos.jpg

    Try these....

    ---- images/30day_guarantee_blue.gif
    ---- images/3Lambos.jpg

    if the "images" folder is inside the "public_html" folder then you shouldn't have trouble.

    I hope this helps. If not, PM me. This probably can be solved in a few minutes.

    -C
    {{ DiscussionBoard.errors[1373996].message }}
  • Profile picture of the author edynas
    Banned
    Just had a look at your images directory but the images you are linking to are not online
    Code:
    http://www.imfoundations.com/images/
    you should upload it to that folder

    Edwin
    {{ DiscussionBoard.errors[1374058].message }}
  • Profile picture of the author dv8
    Edwin and -C, thank you! I will be making the changes a little later.

    I'll let you know how I make out.
    {{ DiscussionBoard.errors[1374935].message }}
  • Profile picture of the author dv8
    Thanks for your post asgraphixs.
    {{ DiscussionBoard.errors[1379900].message }}

Trending Topics