Just another WordPress.com weblog

Posts tagged ‘magento product image’

How to change ‘product ‘ directory name from media path in magento 1.4*

Hello All,

I found the way to rename product image folder from ‘product’ to ‘products’ or any name you wants.

1) First of all you have to rename folder name to the physical path of your project (i.e ‘project/media/catalog/product’ to ‘project/media/catalog/products’)

2) You need to change in 5 files under PATH = project/app/Mage/Catalog/Model:
You need to change from all media path ‘product’ to ‘products’ to below listed files.


file_exists(Mage::getBaseDir('media').DS.'catalog'.DS.'product'.DS.$size.DS.$image)

TO

file_exists(Mage::getBaseDir('media').DS.'catalog'.DS.'products'.DS.$size.DS.$image)

REPLACE below code

'catalog/product/'

TO
'catalog/products/'

File1: PATH / Product/Attribute/Frontend/Image.php

File2: PATH / Product/Attribute/Media/Image.php

File3: PATH / Product/Image.php

File4: PATH / Product/Media/Config.php

File5: PATH / Entity/Product/Attribute/Frontend/Image.php

I hope you will find this post helpful.. If you have any question add your comment.

Thanks,
Bijal Bhavsar 🙂