0

I have a multi-store shop where product images are the same in all store views. As a consequence I have lots of thumbnails - duplicates of each other, e.g.:

media/catalog/product/cache/5/small_image/300x/9df78eab33525d08d6e5fb8d27136e95/b/a/bag.jpg
media/catalog/product/cache/5/small_image/600x/9df78eab33525d08d6e5fb8d27136e95/b/a/bag.jpg
media/catalog/product/cache/2/small_image/300x/9df78eab33525d08d6e5fb8d27136e95/b/a/bag.jpg
media/catalog/product/cache/2/small_image/600x/9df78eab33525d08d6e5fb8d27136e95/b/a/bag.jpg
media/catalog/product/cache/11/small_image/300x/9df78eab33525d08d6e5fb8d27136e95/b/a/bag.jpg
media/catalog/product/cache/11/small_image/600x/9df78eab33525d08d6e5fb8d27136e95/b/a/bag.jpg
media/catalog/product/cache/4/small_image/300x/9df78eab33525d08d6e5fb8d27136e95/b/a/bag.jpg
media/catalog/product/cache/4/small_image/600x/9df78eab33525d08d6e5fb8d27136e95/b/a/bag.jpg

If I extend Mage_Catalog_Model_Product_Image and simply comment out the store_id from setBaseFile($file) function, e.g.:

    // build new filename (most important params)
    $path = array(
        Mage::getSingleton('catalog/product_media_config')->getBaseMediaPath(),
        'cache',
        //Mage::app()->getStore()->getId(),
        $path[] = $this->getDestinationSubdir()
    );

Will there be any unintended consequences from doing this, and, will it work?

0

Yes you can safely do this in your situation. Please refer to my answer in this question: How to store cache in centralised ID folder in magento?

| improve this answer | |

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