Answer the question
In order to leave comments, you need to log in
Organization of storage of photos of the goods of the online store?
Good afternoon.
It's not entirely clear to me how to store this whole thing, do I need to store a lot of photos of different sizes, how to structure a catalog, how to call photos names to avoid collisions?
For example, there are 10,000 products, if you create a catalog for each photo size, you will get 3-4 catalogs with 10,000 files inside, there will be a load on the file system .. or create a separate catalog for each product, but then there will be 10,000 product catalogs in the main catalog ...
Answer the question
In order to leave comments, you need to log in
Store the original as you like, preferably without Cyrillic, spaces and hyphens, in an optimized state
Use <img width="" height="">
c https://developers.google.com/speed/pagespeed/module/
If you need to view images through the gui, scatter everything in directories of 1000 pieces each
1) Store files with a hash name of the form 0b6ac707bc62fe8b4afb1cc8a1bc72cf.jpg
2) To avoid many files in one directory - store in directories in parts of the file name
3) Store the real file name that was when uploading.
4) Cache resizes, for example:
/resize_cache/0b6/ac7/07b/100x100/0b6ac707bc62fe8b4afb1cc8a1bc72cf.jpg
/resize_cache/0b6/ac7/07b/650x650/0b6ac707bc62fe8b4afb1cc8a1bc72cf.jpg
Не хочу показаться КО, но на сайт можно вывести одну и ту же картинку в разном размере. HTML позволяет это делать.
Немного отсебятины:
У себя файлы храним в каталогах по 1000 шт., полет нормальный.
Обязательно создаем превью файла меньшего размера, пользуемся именованием фликера, т.е. в конце файла ставим _s для тумбов.
Названия берем из алиаса + микротайм, например: kvartira_v_belitsah_27535.jpg, kvartira_v_belitsah_27535_s.jpg
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question