Results 1 to 10 of 10
  1. #1
    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

  2. #2
    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?

  3. #3
    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.

  4. #4
    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.)

  5. #5
    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!

  6. #6
    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?
    Yes they are. I'll upload them with FTP into the Images folder within the public-html directory.

  7. #7
    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.)
    Well as you may or may not already know HTTP stands for Hypertext Transfer Protocol and is the protocol which literally transfer data from a server to your PC.
    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,

    Jord
    Our greatest glory is not in never falling, but in rising every time we fall. - Confucius

  8. #8
    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

  9. #9
    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!

  10. #10
    Join Date
    May 2005
    Location
    England, UK
    Posts
    70
    Thanks Jasong

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •