Image location on FTP

Joined
Jun 28, 2007
Messages
99
Reaction score
0
Points
6
This is my first shot at a webpage for a company I am starting. I have already designed the page and have it set up in Dreamweaver, it functions GREAT and looks great when I open it up in a browser like FireFox. My problem here is that all of the code is linked to stuff on my computer (everything used on the site is in a folder called webpage) but:

When I upload it to my FTP my images will not show up because the code links them to a folder on my computer called "...webpage/images/icon1.png"

How do I make my images show up on the website when I upload it? Also can Dreamweaver be used like a FTP to avoid any confusion and to make sure it always uploads the right files? Right now I am using CyberDuck.

Thanks!
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
You should be using relative paths to content as it will make this much much easier for you. For example, instead of using /Users/user/webpage/images/hello.png in your code (and it sounds like this is the case), use something like images/hello.png. This way, when you upload, you're pointing at a valid directory. Does that answer your question?

Example:

Let's say your files are in /Users/user/webpage. In that folder is your index and a folder called images. In the images folder, you have a picture called hello.png. Here is a "graphical" representation:

webpage/
- index.html
- images/
-- hello.png

If you're going to link to that image from your index, do not put the following:
Code:
<a href="/Users/user/webpage/images/hello.png">Link to Picture</a>
Instead, put the following in your index:
Code:
<a href="@images/hello.png">Link to Picture</a>
Do not include the @ symbol - without it, vBulletin reformats the URL.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top