0

How do you import product images from a CSV file using System > Import/Export > Import?

I've followed suggestions from various sources but nothing works. This is the format of the CSV file:

"sku","image","small_image","thumbnail"
90048,"test.jpg","test.jpg","test.jpg"

The file 'test.jpg' exists in the media/import folder so i'm not sure why this does not work.

We are using Magento CE 1.7.0.2.

When I run the import with the CSV file above the image does not get added to the product.

2 Answers 2

7

I have set up a documentation of the product import format of Mage_ImportExport at http://www.integer-net.de/download/ImportExport_EN.pdf which describes in detail how to import for example images.

Regarding your problem: you need a few extra columns to add the image to the media gallery, otherwise it won't get imported:

"sku","image","small_image","thumbnail","_media_image","_media_attribute_id","_media_is_disabled","_media_position","_media_lable"
90048,"test.jpg","test.jpg","test.jpg","test.jpg",77,1,1,"Image 1"

Notes:

  • The _media_attribute_id column requires the ID of the product attribute media_gallery. It can be obtained either from the admin panel or your custom modules using the expression Mage::getSingleton('catalog/product')->getResource()->getAttribute('media_gallery')->getAttributeId();

  • The typing error _media_lable is intentional and hard-wired into Magento.

7
  • This also has the same result unfortunately - it doesn't import the image. The importer says the row is valid and processes it, but the image is not added to the product.
    – Chris
    Apr 28, 2014 at 15:32
  • Have you checked if the _media_attribute_id is correct? I am sure that the above is working, I used it many times. Apr 28, 2014 at 15:34
  • 1
    Image Import doesn't work in Magento 1.5.x, it was first implemented in 1.6.0.0. Apr 28, 2014 at 15:35
  • Checked and confirmed our _media_attribute_id was 88 - updated the CSV and it works now! So for the avoidance of doubt, this CSV worked for us: "sku","image","small_image","thumbnail","_media_image","_media_attribute_id","_media_is_disabled","_media_position","_media_lable" 90048,"test.jpg","test.jpg","test.jpg","test.jpg",88,1,1,"Image 1"
    – Chris
    Apr 28, 2014 at 15:48
  • @AndreasvonStudnitz how to import images in Magento 1.5.X ?
    – MageDev
    Mar 3, 2016 at 9:01
0

Add a slash before the image name.

"sku","image","small_image","thumbnail"
90048,"/test.jpg","/test.jpg","/test.jpg"
5
  • Tried that but same result - image doesn't get imported.
    – Chris
    Apr 28, 2014 at 15:17
  • @Chris : Does solve your error
    – Gem
    Aug 8, 2016 at 5:30
  • Bulk image import not working, my excel format i.imgur.com/E9Qbjww.png
    – Gem
    Aug 8, 2016 at 6:03
  • My error : i.imgur.com/nSlvTX6.png
    – Gem
    Aug 8, 2016 at 6:03
  • Does product with SKU 91001100 exist in the system? The error suggests not. Also check your media_attribute_id is 88 (see comments above).
    – Chris
    Aug 9, 2016 at 11:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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