Better folder structure for storing images in the file system?

I am creating a website for a small company with a catalog page showing categories and a list of all products. I have images for each product, stored in one folder for each product, each folder containing a small, medium and large version of the file (for use in different places).

Is it recommended / more efficient to combine all small, all medium and all large images in one folder each, so when the directory list is dynamically created using PHP / MySQL, the server (shared hosting) should not look in 10 different folders where there is one image ?

I would notice about 10 points per page / request? (about 500 products in total?)

+3
source share
1 answer

How are images created and prepared? I mean, most image-creating programs store one size for each folder. If in this case there is no intermediate step necessary for moving / copying images. I think the efficiency is not much different.

May I ask if you use the framework for the site?

+1
source

Source: https://habr.com/ru/post/1793031/


All Articles