I have migrated my products from Magento 1 to Magento 2. How to hide bulk product images? For example, I have product with 4 images found on backend, I want only one product will display on frontend. Aside from using backend is there another way to make it easier without manually hiding each product image on backend?
2 Answers
You can try this query:
UPDATE catalog_product_entity_media_gallery_value
SET disabled = 1 WHERE position != 1;
You should run this query:
update catalog_product_entity_media_gallery_value
set disabled = 1 where value_id not in
(select value_id from catalog_product_entity_media_gallery where value in (select value from catalog_product_entity_varchar where attribute_id in (87, 88,89)))