public function getThumbnailUrl($filePath, $checkFile = false) { if ($this->_imageShouldComeFromCloudinary($filePath)) { $imageProvider = $this->_buildImageProvider(); $imageDimensions = $this->_buildImageDimensions(); $defaultTransformation = $this->_getConfigHelper()->buildConfiguration()->getDefaultTransformation(); return (string) $imageProvider->transformImage(Image::fromPath($filePath), $defaultTransformation->withDimensions($imageDimensions)); } return parent::getThumbnailUrl($filePath, $checkFile); }
/** * Thumbnail URL getter * * @param string $filePath original file path * @param boolean $checkFile OPTIONAL is it necessary to check file availability * @return string | false */ public function getThumbnailUrl($filePath, $checkFile = false) { if (!Mage::helper('uaudio_storage')->isEnabled()) { return parent::getThumbnailUrl($filePath, $checkFile); } if (!$this->_getStorageModel()->fileExists($filePath)) { return false; } $dest = $this->resizeFile($filePath); if ($dest) { return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . $dest; } return false; }