[thelist] [CODE] bloated image src names

Aleem Bawany aleem.bawany at utoronto.ca
Wed Nov 13 01:58:01 CST 2002


Hassan:
> + a simple `ls *foo*` finds all your "foo files", instead of
>    having to run `find . -type f -name '*foo*' -print`
>
> + less likely to have problems with duplicate file names (when you
>    start rearranging things later)
>
> + waste less time looking up paths to images
>

sorry for cutting in late, but I would have to side with using folder
names rather than these convention. I guess it really depends on how
extensively your site is using images, but a hierarchical organization
is definitely more usable than a flat one (of course if you use _, and
other work around you are merely trying to find a workaround for folder
names).

If your side only needs a couple of images then there's no need to go
into folder hierarchy, and this applies to almost any kind of
organization.

Benjer:

> <img src="images/menu_nav/food_nav/main_subnav_prawns.gif"
> but when you have lots of images this does BLOAT the code somewhat.

I personally use small folder names much like yahoo does:
i/m/f/prawns.gif. It's a good idea to limit the folder hierarchy to 2/3
folders and use two-char folder names if you suspect names will collide.
This is the most bandwidth friendly approach but a pain for someone else
who might have to later decipher it, unless you have a script running.

aleem




More information about the thelist mailing list