Fashion / Retail
Support & Evolution
Result: Image gallery implemented in the catalog without impacting store performance
Catalog performance with image gallery at scale
The challenge
Lua Luá requested the inclusion of image galleries on catalog pages. For a fashion store, this makes perfect sense: more images per product mean more context for the customer and, generally, higher conversion.
What the demand brought along, non-immediately, was a performance issue. Each product that gains a gallery multiplies the number of requests required to load that page. On the backend, Magento needs to fetch and process data for each image individually. In a catalog with a significant volume of SKUs, this cost accumulates fast.
The store kept working. But with every product with an added gallery, the loading became a bit heavier. Without intervention, the trend was clear.
The solution
Trezo approached the problem on four simultaneous fronts, because none of them, in isolation, would solve the issue sustainably.
In the browser, lazy loading was implemented for catalog images. Images outside the visible area of the screen are no longer loaded during the initial access and are instead loaded as the user navigates. This reduces the perceived weight when opening the page and distributes requests throughout the browsing time.
In image delivery, Fastly was configured to optimize the files served in the catalog. Images undergo an automatic format and quality adjustment process before reaching the browser, without manual intervention per product.
On the backend, the query responsible for fetching and assembling image data was revised. Redundant queries were eliminated, and the loading workflow was reorganized to reduce server work per request.
Finally, a caching layer was applied so that already processed image data does not need to be recalculated with every access. The server processes it once and serves it from cache in subsequent requests.
The results
- Image gallery implemented in the catalog without measurable performance degradation
- Reduction in the number of effective requests per catalog page load
- Lower backend processing time per product with a gallery
- Capacity for catalog growth without a proportional impact on server load



