SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    SitePoint Zealot
    Join Date
    Feb 2002
    Location
    UK
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Website Folder Structure

    Hello, can anyone advice me with the following please

    My website Iím designing has approximately 100 pages and at the moment each page has its own folder to store that pages images i.e. pageone.htm has directory pageone_files and pagetwo.htm has pagetwo_files etc.

    I was thinking..... is this the best way to have the structure bearing in mind about 80% of the images are common through out my site, or should I have just one directory storing all images therefore dramatically reducing the size (bytes) of my site.
    Also if using just one directory will there be a speed issue Ė making the site load slower?
    Thanks all in advance
    sanc

  2. #2
    SitePoint Wizard
    Join Date
    Jul 2001
    Location
    The Netherlands
    Posts
    2,617
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would certainly opt for the second option, keeping one folder for all your images. This does not take down the speed of your website, and makes sure the website is a lot smaller then it is right now, so it will take up less diskspace.

  3. #3
    + platinum's Avatar
    Join Date
    Jun 2001
    Location
    Adelaide, Australia
    Posts
    6,441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should have a common 'images' folder, it makes life a whole lot easier... plus if you ever move a page somwhere, the image paths always stay the same.

    Having the images in a dfferent directory wont effect speed, etc at all, in fact the way you have it now might be forcing unnecesary downloads of the same image

  4. #4
    SitePoint Wizard
    Join Date
    Nov 2000
    Location
    Chico, Ca
    Posts
    1,125
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Definatly agree, one common folder for the images, it just makes linking the images and future management of the site so much easier. And if you use XHTML and CSS it's even easier


    Chuck
    "Happiness doesn't find you, you find happiness" -- Unknown
    www.chuckknows.com

  5. #5
    SitePoint Zealot
    Join Date
    Feb 2002
    Location
    UK
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guy for your advice
    The reason for me asking in the first place was because when I originally started designing my site on Dreamweaver 4 it automatically or prompted (can't remember) to set up the structure as described.
    Thanks again, will probably change the structure now making it nice and slim line
    sanc

  6. #6
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,810
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Again, yep - common images folder is wise

    You can if neccessary have context specific subfolders to make things easier to follow (for example "Layout" to contain your structural graphics "photos" to contain photographs "headers" to contain section headers etc). This is not neccessary, but it does make the site easier to understand. The same clarity can be achieved simply by implementing and adhering to "naming conventions".

    A word on linking -

    Relative linking is groovy as it saves code, but if you move files around the structure of the site it can go pear shaped. Absolute linking gives a ton of code, and means that the site is not so easily portable if you get yourself a funkier url. My current preferred option is to use "/images/sample.gif". This ensure that wherever your page is in the site, it will first go to it's root, then to the images folder.

    For example:

    You have a page : www.mysite.com/fee.html

    In that page, you have an image called "fi.jpg", which is stored in "www.mysite.com/images/fi.jpg" .

    You could use any of the above methods to link. All is fine for a few months until you decide to "archive" the page. It's new address becomes: "www.mysite.com/archive/fee.html" .

    If you have linked with option 1 (relative), you've just lost the image. The page is now looking for "www.mysite.com/archive/fi.jpg" - and that doesn't exist. If you'd linked with option 2 (absolute), your page would still work ok.

    Then..... The domain name "foe" becomes available - you've wanted it for years so buy it and port your site.....aaaargh - the pictures dissapeared again.

    You've moved your site to the new domain, but now the page (which has become www.foe.com/archive/fee.html), is looking in the wrong place for the picture. Had you used the last option, it wouldn't care about the www.mysite.com/www.foe.com - it would simply have gone to the root - then found everything still in its proper place

    Does that make sense?
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS

  7. #7
    long gone but not forgotten AljapaCo's Avatar
    Join Date
    Aug 2001
    Location
    Sweden
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To make it even some esaier ...

    I have one folder for general images and separate folders inside subsection folders where the images for that specific folder is stored...

    It is a whole lot easier if you would like to erase a subsection, swap all images etc etc...
    T O B I A S - S T R A N D H | visit my site here
    OPERA7 /MSIE6 /FireFox 1.1/Win2000 /ADSL /17" Screen /1024x768
    god doesn't create genius, he clones me.............

  8. #8
    SitePoint Member
    Join Date
    Jan 2002
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Search engines

    Hello sanc,

    A point to note: a seperate images folder is wise for search engine traffic. Engines may suspect you of spamming. In todays world of search engine traffic you have to follow by the rules.

    All the best with your site!

    Regards

    Richard
    Richard - richard@wayhawke.com
    Wayhawke Ltd. - High Quality web hosting
    http://www.wayhawke.com

  9. #9
    SitePoint Wizard iTec's Avatar
    Join Date
    May 2001
    Location
    Sydney, Australia
    Posts
    2,243
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Search engines

    Originally posted by wayhawke
    A point to note: a seperate images folder is wise for search engine traffic. Engines may suspect you of spamming. In todays world of search engine traffic you have to follow by the rules.
    where you store your images and how doesnt matter to the search engines. they cant tell the difference between images.

    how i work is i have a /common/ folder (css, functions, ect ect), in this i have a sub folder called images (/common/images/) that i store all the images that are used site-wide for the layout, and then i have a general /images/ directory for images that arent specifically for one page.

  10. #10
    SitePoint Member
    Join Date
    Feb 2001
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wink

    where you store your images and how doesnt matter to the search engines. they cant tell the difference between images.
    They actually can tell the difference between images. Take the example of google.com you can do just an image search.

  11. #11
    SitePoint Addict jbradley's Avatar
    Join Date
    May 2002
    Location
    Huntsville, AL
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As others have suggested, I would just have one 'images' folder. It makes life incredibly simple. You don't have to worry about uploading image after image to this place or that place...it's much more easy. You have enough work already. Why make life harder on yourself?

    Jason
    Jason Bradley
    Post your project and receive FREE bids from professionals!
    naSnap Freelance Marketplace

  12. #12
    Back in Action Winged Spider's Avatar
    Join Date
    Jun 2001
    Location
    outside my mind
    Posts
    900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sometimes Ill mirror a sites content and imgages folder. So I'll have

    /img/beans/soft.jpg

    I never was good at naming images to make sense.



Bookmarks

Posting Permissions

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