Results 1 to 10 of 10
-
05-02-2005, 03:03 PM #1Junior Guru Wannabe
- Join Date
- May 2005
- Location
- England, UK
- Posts
- 70
Posting pics on a site? Help needed
As everyone appears to be pro's on the website bizz I thought I should post this thread in a more 'noobie' forum.
I'm trying to place some images in a web page but when I add a link to the image so the computer's know where to get the image from it does'nt work.
Should I upload the image to the database and link to it from there? I don't want to link from other site's incase they go off-line the images will go aswell.
I usually put pages in the public_html directory in the database. There is though another directory called Images in the Public_Html directory.
Any help on this is greatly appreiciated!
Thanks
-
05-02-2005, 03:23 PM #2Web Host :)
- Join Date
- Jan 2002
- Location
- Boston
- Posts
- 5,014
public_html is your main web viewable folder so when you type in www.yourdomain.com your index.html file in public_html is going to load.
Usually people create a folder called images within the public_html folder to store all of your images. This would be public_html/images
What you need to do is upload your html files to public_html and your images to the images folder witihin the public_html folder and make sure your html calls your images from the correct folder.
What are you using to design your site?
-
05-02-2005, 03:30 PM #3Web Hosting Master
- Join Date
- Jun 2004
- Location
- Boise, ID U.S.A.
- Posts
- 3,499
By the way, one common problem is that access to the pictures can be case sensitive. If your hyperlink is http://www.mydomain/mypicture.jpg and your picture is mypicture.JPG it can fail to display.
-
05-02-2005, 05:28 PM #4Junior Guru Wannabe
- Join Date
- May 2005
- Location
- England, UK
- Posts
- 70
Thanks a lot guys.
One mistake I made is when linking I was putting http:\\ to link to pages already within the database. http:\\ - Does that mean look on the internet for the link?
I removed the http:\\ and now the page links are working - Is that because now the HTML link is just looking within the database instead of on the internet?
(I'm using FrontPage 2000.)
-
05-02-2005, 05:30 PM #5Web Hosting Master
- Join Date
- Mar 2004
- Posts
- 1,468
Just to make sure - The images are on your web server and not computer correct?
Haven't been on WHT for 6 years!
-
05-02-2005, 05:35 PM #6Junior Guru Wannabe
- Join Date
- May 2005
- Location
- England, UK
- Posts
- 70
Originally posted by jasong
Just to make sure - The images are on your web server and not computer correct?
-
05-02-2005, 05:36 PM #7Web Hosting Master
- Join Date
- Jul 2004
- Location
- Manchester, UK
- Posts
- 2,132
Originally posted by Swerve1000
Thanks a lot guys.
One mistake I made is when linking I was putting http:\\ to link to pages already within the database. http:\\ - Does that mean look on the internet for the link?
I removed the http:\\ and now the page links are working - Is that because now the HTML link is just looking within the database instead of on the internet?
(I'm using FrontPage 2000.)
However linking using something like:
<img src="www.google.com/good.gif">
should be no different from using
<img src="http://www.google.com/good.gif">
(Unless of course the image (good.gif) is accessible only by ftp:// (file transfer protocol).
Remember though directly linking to an image stored in a ftp database will not work if the ftp database is protected by any means.
Making a dedicated images folder is always a good idea and so the tag would like more like:
<img src="www.google.com/images/good.gif">
(If the folder containing the image was called 'image'.)
Hope i'm not being patronising with this info,
JordOur greatest glory is not in never falling, but in rising every time we fall. - Confucius
-
05-02-2005, 05:53 PM #8Junior Guru Wannabe
- Join Date
- May 2005
- Location
- England, UK
- Posts
- 70
hehe. Patronising no. Helpfull Yes.
I understand that, www and http arte the same but what get's me is will I have to use http OR www to link the page/HTML to images within the database or can I just miss that off like I have on the webpages?
Thanks
-
05-02-2005, 05:58 PM #9Web Hosting Master
- Join Date
- Mar 2004
- Posts
- 1,468
You keep using the word database...
Do you have the image stored in a actual database like MySQL?
or do you just have it in a folder.
If you have it in a folder, upload the photo (photo.jpg) into a folder called "images" (create the folder if its not there) inside the public_html folder.
Now, in your public_html folder, save your html file.
In your html file should be..
<img src="http://www.yoursite.com/images/photo.jpg">
or,
<img src="/images/photo.jpg">
Both should work.
Good luck!Haven't been on WHT for 6 years!
-
05-02-2005, 06:01 PM #10Junior Guru Wannabe
- Join Date
- May 2005
- Location
- England, UK
- Posts
- 70
Thanks Jasong