How to resize image in magento?

How to resize image in magento?

14 Jul 2014 16:21

To resize image in magento use below code and pass image url as parameter in Varien_Image object.

/** Varien Image object for image url */
    $imageObj = new Varien_Image($imageUrl);
/** Set constrain */
/** Keep Image Aspect ratio */
/** Keep Image frame */
/** Keep Image Transparency */
/** Set image background Color */
/** Set background color */
/** Set image quality */
/** Set watermark Image Opacity */
/** Set image size and */
    $imageObj->resize(182, 126);
/** Save image at given new file path */


Hello, I'm

KrikaSoft offers innovative IT solutions and services to businesses worldwide. Specializing in Web development, Web customization, and Website design, we excel in Magento, WordPress, and other PHP frameworks. From Hybrid Application Development to seamless user experiences, trust us as your technology partner for reliable and cutting-edge solutions. Experience excellence with KrikaSoft!

Latest Post