Bulk Hiding or Showing Magento Product Gallery Images

Bulk Hiding or Showing Magento Product Gallery Images

When you import products, Magento often ticks the Exclude box on each image. Excluded images do not appear as thumbnails under the main product photo, which can leave galleries looking empty. Changing them one by one is slow, but the setting lives in a single table.

The SQL

Run the first statement to un-exclude every image, or the second to exclude them all:

# Mass Unexclude
UPDATE`catalog_product_entity_media_gallery_value` SET `disabled` = '0' WHERE `disabled` = '1';
 
# Mass Exclude
UPDATE`catalog_product_entity_media_gallery_value` SET `disabled` = '1' WHERE `disabled` = '0';

Back up the table first, then clear the cache so storefront pages pick up the change.

Want this done for you? Find out more about our Magento development service.

Keep reading

Related articles

All articles

Need a hand?

Stuck on something similar?
We can fix it with you.

Send us the problem. A senior developer reads every message and replies within one working day.