load photos in webpage
I made a simple webpage for a girlfriend, published it by hostica.com
At home I put all 4 photos in a folder called fotos. I uploaded everything with Filezilla. When I opened the page, the photos would not load. After I moved all the photos to a folder called images, which was already there,they loaded ok. In my files they were referenced as Code:
<img src="fotos/headandshoulders.jpg" /> I changed that to: Code:
<img src="images/headandshoulders.jpg" /> Why is that? |
This maybe should go into a different forum, such as Programming.
The standard directory to place images within in an HTML page is images. In fact, you do not need the text "http://www.linuxquestions.org/questions/images/" before each filename in the src= parts of the attribute. Code:
<img src="headandshoulders.jpg" /> I'm sure there are more detailed references, this is just a known thing to me but I searched a little for a reference that explains this http://www.htmlgoodies.com/primers/h...le.php/3478181 in the paragraph where it says "Placing An Image On Your Page". Also, since I learned HTML by the seat of my pants and not via formal training, my answer is colored by trial and error based experience versus some substantive knowledge of the development of the language. |
Hi,
since you mention that a directory called "images/" was already there in your web space, maybe your hosting provider is expecting you to use it, and doesn't allow to override it. On the other hand, you might want to check the settings of your hosting account: perhaps the "images/" directory is defined somewhere and can be overridden by the user. I assume that your custom "fotos/" directory is at the same level as "images/", and that permissions are set correctly. That said, I never had problems like this, either on my local server (Apache) or on the remote hosting space (Apache as well): I can use the names I want, and put directories and files wherever I want. However, if yours is a cheap hosting service then you might have some restrictions. Regards, Philip |
All times are GMT -5. The time now is 05:50 AM. |