Hello Magento Friends,

Today I will explain How to Implement Magnifier Widget in Magento 2

Magento JavaScript library includes a wide range of jQuery widgets. One of them is the Magnifier Widget. Magnifier Widget allows displaying images in 100% zooming scale. In Magento, this widget is used by the gallery widget to zoom product images on product pages.

Magnifier Widget is disabled by default. The below steps will help you enable Magnifier Widget in Magento 2. You can define the action, dimension, and mode of the Magnifier Widget.

So, without further delay, let’s dive in,

Steps to Implement Magnifier Widget in Magento 2:

Step 1: You can write this code in the phtml file where your media gallery is situated. Here, we have added the code in the following path.

app\design\frontend\Themes\Yourtheme\Vendor_Extension\templates\test.phtml

And add the below code

Step 2: Enable Magnifier From View.xml, move to below path

app\design\frontend\Themes\Yourtheme\etc\view.xml

And add the below code

Conclusion:

This way, you can effectively Implement Magnifier Widget in Magento 2. If you do not want to use jQuery Widgets, you can even implement zoom for product images, Check out – Magento 2: How to Show Product Magnification/Zoom in Product View Page.

Just in case you come across any hardship, mention it in the comment section below. Share the article further. I will be back with another Magento solution, till then stay in the know.

Happy Coding!

Click to rate this post!
[Total: 7 Average: 2.9]