Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-09-2014, 08:24 AM   #1
Senior Member
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 14.04
Posts: 1,555

Rep: Reputation: 45
load photos in webpage

I made a simple webpage for a girlfriend, published it by

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

<img src="fotos/headandshoulders.jpg" />
This worked fine at home.

I changed that to:

<img src="images/headandshoulders.jpg" />
This works on the net.

Why is that?
Old 06-09-2014, 01:45 PM   #2
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 5,948
Blog Entries: 12

Rep: Reputation: 2030Reputation: 2030Reputation: 2030Reputation: 2030Reputation: 2030Reputation: 2030Reputation: 2030Reputation: 2030Reputation: 2030Reputation: 2030Reputation: 2030
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 "" before each filename in the src= parts of the attribute.
<img src="headandshoulders.jpg" />
will work fine. Yes it does seem counter-intuitive in that it appears legal to use your first notation because you selected a sub-directory called "fotos"; however I've not had success using alternate sub-directory names either, I've always had to use "images".

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

Last edited by rtmistler; 06-09-2014 at 01:48 PM.
1 members found this post helpful.
Old 06-09-2014, 05:29 PM   #3
Philip Lacroix
Registered: Jun 2012
Distribution: Slackware, *BSD
Posts: 396

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470

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.


Last edited by Philip Lacroix; 06-09-2014 at 05:36 PM.
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Linux on VMware cannot load any webpage, but ping works. Grtyop Linux - Newbie 4 09-12-2013 05:28 AM
Cannot load more than one webpage/download item on Wifi (Ubuntu 12.04) HolyMythos Linux - Newbie 1 05-18-2012 05:37 PM
embedded windows media in firefox? webpage won't load hedpe Linux - General 1 04-28-2005 07:07 PM
Webpage load time Windows=0,6sec Linux=+30sec !!!! RedDwarf Linux - Networking 0 08-07-2004 10:08 PM
Stalled WebPage Load/No Download DigitMole Mandriva 2 02-02-2004 06:09 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:10 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration