Magento – Importing Images via CSV in Magento

csvdataflowimageimportmagento-1.9

I am running Magento 1.9.0.1 and am having really bad issues with the Product Images showing on import via CSV.

I have been researching this issue for 3 days with no luck. When I upload an image manually when creating a single new product, it gets saved into a cached dir such as /1/9/imagename.jpg I have tried uploading images to that dir and then having the path in the CSV with no luck. I did not have a media/import directory, I created one and tried both the full pathing and just /imagename.jpg as suggested in other post. I have tried various php scripts that others claimed worked. Everything I try to do in 1.9.0.1 to get these images to show up has failed.

I have also been re-indexing and flushing cache. At this point, listing everything I have tried will take too long. I will be actively watching this question until I have it resolved :3

Please let me know what further information you need to attempt to help me on this, there is very little knowledge base for 1.9.0.1

Best Answer

If you want to import images into Magento, use ImportExport with the following sample CSV:

sku,_media_image,_media_attribute_id,_media_is_disabled,_media_position,_media_lable,image,small_image,thumbnail
1234567,img1.jpg,77,1,1,Image 1,img1.jpg,img2.jpg,img2.jpg
,img2.jpg,77,0,2,Image 2,,,     
,img3.jpg,77,0,3,Image 3,,,

The files must be in /media/import/. No slash for the image names!

You can get the value for the _media_attribute_id by calling

Mage::getSingleton('catalog/product')->getResource()->getAttribute('media_gallery')->getAttributeId();
Related Topic