1

I'm using the Magento Store in version 1.7.0.2. I have a question about the product images. Is it necessary to optimize the product images before uploading or does optimize Magento the corresponding image sizes depending on the application screen size automatically?

1

Hello Image optimization you Magento Provide the good functionality for resize() image so you can use that as per your requirement on when you want to use the Product Images.

<?php
 $img=Mage::helper('catalog/image')->init($_product, 'small_image')->keepFrame(true)->resize( $imgSizeWidth, $imgSizeHeight );
?>

Hear small_image has two more property like image & thumbnail

keepFrame(true) means it will remove the white background when Image is crop.

resize(width,height) means specify height & width.

For product Listing page refer the catalog/product/list.phtml file.

For Detail Page refer catalog/product/view/media.phtml file in your Theme folder. Hope you got proper answer.

  • Hello Keyul,thanks for your quick answer! But I don't know how to handle this php-code. In what file I have to write this code? Do you have an example? – Uwe Weichelt Sep 4 '14 at 14:06
  • I have update my answer please check – Keyul Shah Sep 4 '14 at 14:28
  • Oh thanks a lot!;) And one more thing: it is harmful at all to the loading time of the Magento Stores, when I add an image file with a big size of 4MB? – Uwe Weichelt Sep 4 '14 at 14:35
  • when you use resize() function then Image automatic Comperes so don't worry – Keyul Shah Sep 4 '14 at 16:14
  • Ah that's fine - thanks a lot for your useful answers! – Uwe Weichelt Sep 4 '14 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.