Magento – How to create an image upload product attribute in magento

attributesPHP

I know to create new product attribute in magento by catalag->manage attributes. By the same way i have created an image upload product attribute.It was suceessfully created and also i have added this attribute to default attribute set.

But that image upload attribute doesn't show on product creation page.(Text,Yes/No,etc…I got these kind attributes)

I have searched a lot regarding this issue. I can't find how to reslove this issue. Please save me guys

Best Answer

One option is to make it a Media Image attributea and add it to the Images group in the attribute set. This way the file uploading part is handled automatically by Magento and it also gives you the ability to resize, crop etc etc the image using the catalog/image helper.

So let's say your Image attribute is called awesome_image you would resize it like this on the frontend

echo (string)Mage::helper('catalog/image')->init($_product, 'awesome_image')->resize(150);

[EDIT] If you do want a new attribute for this. Check out this question on Mage SE. Or optionally, if you don't want to code give this extension a try. I've used it once before. It works pretty well.