1

I am using the catalog helper resize function like this:

Mage::helper('catalog/image')->init($this->getProduct(), 'image', $before_image->getFile())->keepFrame(false)->constrainOnly(true)->resize(800, 600);

This will return the full image size unless it is larger than 800x600.

When it is larger than 800x600, I need to get the resulting size of the resized image. I have pored over the Mage_Catalog_Helper_Image file and cannot find anything that will give me the resulting size.

Is there any method outside of parsing the resulting URL to locate the cached file on my hard drive to determine the final image dimensions?

asked Sep 16, 2014 at 0:43
1
  • if you have getting different size you have install any custom module that will override the functionality or refresh your image cache. Commented Sep 16, 2014 at 5:40

1 Answer 1

2

What you can do is, take what the method is returning, strip the baseurl from it, so you have the path in /media/ and then use getimagesize

answered Sep 16, 2014 at 7:18

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.