Question:
How do you allow images to show up in an HTML file from Dreamweaver?
anonymous
2011-03-17 16:06:44 UTC
I'm a beginner at Dreamweaver and HTML and I have no idea what I'm doing wrong. I was asked to send an example of a webpage to someone through e-mail. I made the file in Dreamweaver, created a ZIP file with the page itself and all the images on it, and sent it to them. After two tries they said they still couldn't view the page correctly, and that there were those little boxes with X's where the images are supposed to be.

So where did I go wrong? I assume it has something to do with the paths of the images...How do you get someone on the other end to see your images if they're on YOUR computer, not on a server? Wasn't sending a ZIP file with everything enough, or were the paths still messed up? I have looked all over for an answer to this and can't figure it out. HELP!!!
Three answers:
anonymous
2011-03-18 15:33:23 UTC
Put ALL files that are need into a Projects folder. Make sure the paths for images and other links are relative paths. Test the pages locally using your browser by dragging/dropping the index.html file into an open browser window. Try all your links to make sure they all work. Zip the FOLDER. The person on the other end will have to extract the files using the same folder. Since all files are present and have been checked, the images should show. All link paths will stay relative to themselves inside the Projects folder because the relationship with each other is the same as it was on your computer.



Ron
pete l
2011-03-17 23:32:50 UTC
Hi,

Yes you already worked it out, the paths are wrong, Dream weaver will relate paths to either the current document or to the root directory.

I think you may have got this bit wrong.

Maybe as a beginner, to send this ZIP file, the best thing to make this work (although it is very bad practise for real web work!! and you need to get this right later) is to put all your images into the same folder as your HTML documents in Dreamweaver so that they work ok on your PC and then Zip them up like that to send.



ADDITIONAL



What I am trying to say is that suppose you had image1.jpg in a folder whose path on YOUR pc was



C;/users/myname/documents/website/images/image1.jpg



So in dreamweaver, you may have referenced that from the HTML document inside which you are placing the image. That document knows where the image is and can find it on YOUR pc however, when you send the webpage to someone else, they will not have the path :



C;/users/myname/documents/website/images/



so the HTML document will be unable to find it and will show a little red cross instead.



What i was suggesting to you for now to enable you to send the webpage and make it work is to go to 'Manage Sites>>Edit>> and in the Local Info, make sure the 'Links Relative to Document' button is selected and not 'Site Root'



Then within your Documents folder for the site where you have your HTML documents, create a new folder called 'Images' and put all your images you want to use in there.



When you insert an image into a HTML document make sure you select the image from the Images folder you have created. The Document will know where to get the image from and no matter who you send the zipped file to, when the file is unzipped, the path will always be correct no matter where it is located on the foreign PC because it is within the Document folder that contains the HTML Documents.



I hope I may have explained this a little better, I could show you much more easily, but that's not possible.. good luck
.
2011-03-17 23:16:50 UTC
THey cannot see the images on your computer.



You could put them on a website, and create image links for there, or if viewing locally make sure they actually have a path that matches yours.



If your path to images is:



C:\Documents and Settings\jimbo\Desktop\path to site



and theirs is



C:\Documents and Settings\somescrewynamehere\Desktop\path to site



they will have to change your pathing to match theirs otherwise they cannot see the images.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...