Blog Sections Open
Organizing Product Images for a Large Evolution CMS Catalog
A practical approach to storing and naming product images when a catalog grows beyond a single flat folder and starts receiving imports from external systems.
Large product catalogs usually start with a simple rule: every product image lives in one folder and the file name matches the product identifier. That works for a while, but once the catalog grows into thousands of items and every product needs multiple photos, the flat-folder approach becomes hard to maintain.
The original setup
A common import flow looks like this:
- catalog data arrives from 1C or another ERP as an XLS or XML export
- the product identifier becomes the Evolution CMS resource identifier or an external article number
- images are uploaded separately with names such as
34567.jpg
The problem appears when one image per product is no longer enough.
What goes wrong with one huge folder
- directory listings become slow and inconvenient
- duplicate or missing names are harder to track
- adding gallery images needs naming conventions that become messy very quickly
- backup, sync, and cleanup routines become more error-prone
A better storage model
Instead of one giant folder, split files into predictable subdirectories. The simplest approach is to group by the first digits of the product identifier or by brand/category.
/assets/catalog/34/34567/main.jpg
/assets/catalog/34/34567/gallery-1.jpg
/assets/catalog/34/34567/gallery-2.jpg
This gives you:
- stable paths
- space for multiple images per product
- easier cleanup when a product is removed
- clearer integration with imports and scripts
How to connect this with Evolution CMS
Store the external product code in a field or TV, then build image paths from that value. If you need a main image and a gallery, keep the main path explicit and let the gallery live in a predictable product directory.
$article = '34567';
$prefix = substr($article, 0, 2);
$basePath = "/assets/catalog/{$prefix}/{$article}";
$mainImage = "{$basePath}/main.jpg";
Recommended pattern for imports
- keep one field for the external product code
- do not depend only on the Evolution resource id
- store one explicit main image path if needed
- derive gallery paths from a predictable folder structure
That gives you enough structure for today while staying simple enough for future automation.
Displaying Products by Category IDs Stored in a TV Field
A practical pattern for listing products by category when category IDs are stored inside a product TV field.
Showing Category-Level MultiTV Values on Child Resources
How to reuse MultiTV data defined on a parent category when rendering child resources in Evolution CMS.