Subfolders are quite a good idea because it does help keep things clean and nicely organized. That's probably why I never use subfolders...
But, it still is a good idea, especially if you plan on having A LOT of products. Here's why. There's a very common limit on shared hosting accounts that doesn't let you list more than 10.000 files in FTP clients, so if you have more than 10k images in your main images directory, you won't be able to see it all, nor delete the ones after the count limit. That's where subfolders come in extremely handy.
One idea is to use products_id as subfolder, but requires you to first insert a product and then edit and upload an image. So, let's say you insert a new product and it's ID is now 956 - you would edit the product and upload the image to /images/956/
Also, this will help your load times for the product_info page because Zen Cart has to "scan" the entire folder and then has to try and match file names to determine if one of those images is an additional image. Now imagine the main image sitting in the /images/ folder with 15.000 other images - Zen Cart has to read the entire folder, build a list of all those files, then check if the extension matches, then check if the file name matches... I don't have any numbers on the processing time, but I'll bet my a** it's faster to scan a dedicated folder and either find no extra files or go through just a few files which will most likely all match...
And last, but not least - maybe someday you'll decide to add a "rollover" image (it's that cute feature where a different product image shows when you hover the main one on listing pages). If that happens, your product_listing page will now have to do the same process described above, only multiplied by the number of items shown on that page...
Oh, yes, there's one more scenario which can mess things up - similar image names. As you grow your store, you might start forgetting about the product names you used before, or maybe you'll just use whatever the supplier gave you. Maybe you'll forget that you had added an image named "fridge.jpg" and you'll now add a new product with the image named "fridge_samsung.jpg". The new product will be fine, but the one you added before will show the "fridge_samsung.jpg" as an additional image because it does match the pattern...
So, if you're just starting fresh, and you DO plan on having lots of products (and therefore images), maybe don't ditch the subfolders idea too fast...
One thing I find missing in the docs is the advice to use lowercase letters on all of your images. Although we're all mostly hosted on *nix servers, there's still Windows servers out there running ZC. Windows are NOT case sensitive, so image.jpg is the same as Image.jpg or imAge.jpg or whatever combination, whereas *nix servers ARE case sensitive so image.jpg can be a picture of a horse, and Image.jpg can be of a plane... And this can very easily cause confusion.
And lastly... The image attached *might* give you an idea on additional images and their naming.
Attachment 19405
Bookmarks