/** * Retrieve Original image size as array * 0 - width, 1 - height * * @return array */ public function getOriginalSizeArray() { // try to catch chili document $product = $this->getProduct(); $documentId = Mage::helper('web2print')->getItemId($product->getWeb2printDocumentId()); if ($documentId && $this->chiliPreviewAllowed()) { $cached = $this->getCacheImage($documentId); if (!$cached) { $cached = $this->generateCachedImage($documentId); } $this->_getModel()->setBaseFile($cached); // try to fetch the image size from chili: $info = $this->getRemoteImageSize($cached); if ($info) { return array_slice($info, 0, 2); } } return parent::getOriginalSizeArray(); }