7
votes

I want to show animated gif images for product .
Uploading gif image is posible but the same is not seen on frontend.
I saw the functionality due to cache in magento animated gif images is not seen.
How can I implement it ?
Check this link for reference.
Thanks in Advance.

1
the link doesn't have any products. Did you get this to work?Miles Pfefferle

1 Answers

10
votes

You can implement it .
Though your caching functionality will not work for animated gif image.
copy file from

path : app/code/core/Mage/Catalog/Model/Product/Image.php to

path : app/code/local/Mage/Catalog/Model/Product/Image.php (create folders if necessary)
Find the line public function getUrl() and replace the function with:

public function getUrl()
    {
        $baseDir = Mage::getBaseDir('media');
        $file = ('gif' == strtolower(pathinfo($this->_baseFile, PATHINFO_EXTENSION))) ? $this->_baseFile : $this->_newFile;
        $path = str_replace($baseDir . DS, "", $file);
        return Mage::getBaseUrl('media') . str_replace(DS, '/', $path);
    }

Hope this will help you.