2

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?

1
  • For each product image there is option to "Hide from Product Page" you can select this option to hide image from product page. based on this you can write down sql query to hide bulk product image in database Apr 12, 2017 at 4:29

2 Answers 2

0

You can try this query:

UPDATE catalog_product_entity_media_gallery_value 
SET disabled = 1 WHERE position != 1;
0

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)))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.