Log in
Model

MediaGalleryProcessor

Magento\Catalog\Model\ProductRepository\MediaGalleryProcessor

What it does

This class handles the processing of product media gallery images when saving products through the ProductRepository.

Developers interact with it indirectly when using the Product Repository API to add, update, or delete product images.

It manages the synchronization between existing gallery entries and new ones, processes image uploads, assigns image roles (base, thumbnail, small_image), and determines which images should be removed.

Public Methods

  • processMediaGallery()
  • processNewMediaGalleryEntry()