Skip to content

Instantly share code, notes, and snippets.

@scgoeswild
Created March 25, 2022 14:14
Show Gist options
  • Save scgoeswild/2f42715cd2bbc529a2ef12d4464fe9ee to your computer and use it in GitHub Desktop.
Save scgoeswild/2f42715cd2bbc529a2ef12d4464fe9ee to your computer and use it in GitHub Desktop.
Unhide magento2 images (gallery) programmatically in SQL
UPDATE `catalog_product_entity_media_gallery_value` SET `disabled` = 0 WHERE `value_id` IN (
SELECT `value_id` FROM `catalog_product_entity_media_gallery` WHERE `value` IN (
SELECT `value` FROM `catalog_product_entity_varchar` WHERE `attribute_id` = (
SELECT `attribute_id` FROM `eav_attribute` WHERE `attribute_code` = "image" AND `frontend_label` = "Base" LIMIT 1 ) ) )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment