I would be having 150-200 products on my website which could grow in the future and I have around 30 - 40 images for each product so I wanted to ask should I have separate folders for storing images of each product or save all the images in one single folder?
Thanks
views:
29answers:
2
+2
A:
I'd use a separate folder for each product - it seems much neater that way and won't end up with too many files in the directory.
It would also make it easier to iterate over all a product's images.
If each product has a unique ID number then you should probably use that for the folder name, unless you want to go the full SEO route and have something like /images/my-product-name/...jpg
Greg
2009-08-14 11:10:22
+1
A:
That depends on the file system - with FAT32 a directory can contain up to 65,536 entries (i.e. files), so you'll probably be fine.
It also depends on whether you only ever want programmatic access, or whether you want some person to have to ever look at a directory with 65K files.
Dominic Rodger
2009-08-14 11:10:49
In the future if I want change my hosting provider and I want to transfer those files and so on...in that case???
halocursed
2009-08-14 11:14:15
Then you transfer them? Or are you worried about your next host not using a FAT32 file system?
Dominic Rodger
2009-08-14 11:16:08
noop.... thanks!!!!
halocursed
2009-08-14 11:20:46