Why Don't My Images Appear In The Browser When Testing?

Discussion in 'Web Design and Development' started by kunihirodestro, Dec 10, 2006.

  1. kunihirodestro macrumors newbie

    Joined:
    Sep 21, 2006
    Location:
    UK
    #1
    Hi,

    Im using dreamweaver MX 2004 and all of a sudden when I go to preview pages in the brower window the images don't appear.

    All my links are working, can anyone give me a hint as to what I've managed to do, it's really annoying me now!:mad:
     
  2. CanadaRAM macrumors G5

    CanadaRAM

    Joined:
    Oct 11, 2004
    Location:
    On the Left Coast - Victoria BC Canada
    #2
    The bolded part is patently not the case.
    What is usually the case is either the images are being referenced at the real website (http://www . domain . com / images/ etc)
    Or that they are being referenced relative to the root of the site, and what you THINK is the root is not the root defined in Dreamweaver's site setup.

    Did you recently move folders, rename folders, do a search and replace on IMG SRC's to correct them? Or redefine a template? Or copy and paste code from a page in one directory to a page in a different directory?
     
  3. rogersmj macrumors 68020

    rogersmj

    Joined:
    Sep 10, 2006
    Location:
    Indianapolis, IN
    #3
    CanadaRAM hit most of the main points there. This is something a lot of people have to deal with when they let WYSIWYG editors like Dreamweaver write code for them. If you're making a static site, then the best way to reference your images is to use relative paths. That is, relative to the document you're calling them from. For example, say you have a site structure like this:

    Code:
    [b]site/[/b]
      [b]css/[/b]
        main.css
      [b]downloads/[/b]
        fileList.html
      [b]images/[/b]
        banner.jpg
        button.gif
        picture.jpg
      index.html
    
    You want to reference an image from index.html; your img tag would look like this:

    HTML:
    <img src="images/banner.jpg" alt="Some title">
    If you were referencing an image from downloads/fileList.html, it would look like this:

    HTML:
    <img src="../images/picture.jpg" alt="Pretty picture">
    That double dot means "go up one directory". You would use the same path if you were referencing images from the main.css file in this example.

    The point is, if you build all your image paths (and internal href links) like that then you can move the site anywhere and it will always work without any modification. Now, if you're building a dynamic site using PHP or something there's a much better strategy, but it doesn't sound like you're doing that.
     
  4. kunihirodestro thread starter macrumors newbie

    Joined:
    Sep 21, 2006
    Location:
    UK
    #4
    Thanks for your help... but basically I know little and am simply dragging and dropping and using dreamweaver like a design package. As far as I know the root folder is set up correctly.

    I've found that if I drag and drop the images, .fla etc from the assets drop down then it all works just fine.

    But as soon as I drag from the Files it doesn't.

    Sorry for my simplicity,

    And it happens even when I set up a new defined site.

    Any help will be appreciated, if not I'll work it out one day as my knowledge grows.
     
  5. rogersmj macrumors 68020

    rogersmj

    Joined:
    Sep 10, 2006
    Location:
    Indianapolis, IN
    #5
    Honestly, I just provided you all the help you need. You're not going to get away with doing everything 100% dragging and dropping. You can set relative paths using Dreamweaver. If I recall correctly, there's a spot in the Properties pane for it, but it's just as easy to edit the code like I showed you above. You do have these images within your web site directory, right?
     
  6. radiantm3 macrumors 65816

    radiantm3

    Joined:
    Oct 16, 2005
    Location:
    San Jose, CA
    #6
    If your not willing to spend time learning some of the basics of how websites work, you should probably use iWeb instead. Dreamweaver is supposed to be a professional web design app (although that's very arguable) and you can't expect to be able to use dreamweaver with absolutely no fundamental knowledge.
     
  7. jsm4182 macrumors 6502

    Joined:
    Apr 3, 2006
    Location:
    Beacon, NY
    #7
    If the files are linked right and the images aren't showing up check what mode the images are in. Certain modes such as CMYK won't display in most web browsers.
     
  8. ChicoWeb macrumors 65816

    ChicoWeb

    Joined:
    Aug 16, 2004
    Location:
    California
    #8
    Are your images in the root folder, or are they sitting on your desktop?
     
  9. kunihirodestro thread starter macrumors newbie

    Joined:
    Sep 21, 2006
    Location:
    UK
    #9
    sat in the root folder all set up correctly. i'll have a look at it later and see how i go.
     

Share This Page