diff --git a/vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php b/vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php index 5b33605266547..325fa71d5d058 100644 --- a/vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php +++ b/vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php @@ -26,7 +26,6 @@ use Magento\Store\Model\Store; use Magento\Catalog\Model\ResourceModel\Category; use Zend_Db_Expr; -use Magento\Catalog\Model\ResourceModel\Product\Gallery; /** * Product collection @@ -723,6 +722,10 @@ protected function _afterLoad() $this->_prepareUrlDataObject(); $this->prepareStoreId(); + if (isset($this->_selectAttributes['media_gallery'])) { + $this->addMediaGalleryData(); + } + if (count($this)) { $this->_eventManager->dispatch('catalog_product_collection_load_after', ['collection' => $this]); }