Question

please visit this link : http://demo.kidsdial.com/boys-toys/bikes-trikes-ride-ons/peacock-kinder-blocks-play-set.html

click on "product image", you can see image ,image will expand with original size [lightbox image]

I want to restrict that lightbox image size to 1200.

please see below media.phtml file

media.phtml file = http://pastebin.com/8yaDrs8Q

help me to restrict the lightbox image size for 1200.

let me know if you need any clarifications,

thanks in advance,....

Was it helpful?

Solution

Use Magento builtin function:

Took from app/design/frontend/rwd/default/template/catalog/product/view/media.phtml

            $_imageUrl = $this->helper('catalog/image')
                              ->init($_product, 'image', $_image->getFile())
                              ->keepFrame(false)
                              ->constrainOnly(true)
                              ->resize(1200);
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top