How to Unhide All Product Images on Product Page in Magento 2
Magento 2 migration is a complex process and not all the time you can end up with smooth migration and a fully functional Magento 2 store.
Sometimes, it may happen that while migrating the product, images, and its data, there comes an issue in the product image which is not displayed.
All the product images remain hidden in the migrated store. This may impact the sales in the store. Product images are critical for potentials customers to understand the layout and appearance of the product.
According to Statista, consumers expected five photos for any product while shopping online. Such numbers prove that no Magento 2 store owners can afford the hidden product images.
Hence, check out the solution to unhide all product images on product page in Magento 2. With this quick solution, you will not need to unhide product images one by one.
Method to Unhide All Product Images on Product Page in Magento 2
Simply change the product image visibility using the following query in the database.
1 |
UPDATE `catalog_product_entity_media_gallery_value` SET `disabled` = '0' WHERE `disabled` = '1'; |
It will replace every 0 with 1, which means it unhides all product images in the hidden state.
That’s all!
If you have any doubts regarding this post, just mention them in the Comments section below.
I would be happy to help.
Feel free to share the solution with Magento Community via social media.
Thank You.
Sanjay Jethva
Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe.
His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.
Prev
How to Show Popup After “Add to cart” Action in Magento 2
How to Get Product Status in Magento 2
Next