4

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

1
  • Double check permissions. More accurately, double check that the process that runs when you attempt your upload has the same rights as the process that runs when an image is uploaded through the admin interface.
    – pspahn
    Commented Nov 13, 2014 at 2:17

2 Answers 2

5

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();
3
  1. Generally you create a new product with images, export using dataflow and check the way images are displayed. copy that way and it will work. generally->

    _media_attribute_id – this is the attribute id of the media_gallery attribute. You can find it by going to Catalog->Attributes->Manage Attributes and searching by media_gallery in the Attribute Code.

    Click it and you will find the attribute id in the URL. In our example it is 703.

    _media_image, _media_lable, _media_position, _media_is_disabled – the file name, label and position of the media image (and if it should be disabled).

    You should place the image files that you want to upload into the media/import directory. That is, in our example, we placed the files new_product1.jpg and new_product2.jpg to media/import.

    You can add only one media image per line. If you’d like to add additional image to the product, you should add a line which looks like line 3 in our example csv:

    "","","","","","","","","","","","","","new_product2.jpg","703","New Product 1 Label 2","1","0","","","","","","","","",""

    (This line must be located under the main line of the product that you want to assign it to)

    image, small_image, thumbnail – those are the big, small and very small versions of the main product image. Obviously you cannot have more than one of each of those per product.

  2. for me the best way to import products, images, etc.. is using MAGMI. you can find that open source project in the following url http://sourceforge.net/projects/magmi/ . The tutorial of how to use it -> http://wiki.magmi.org/index.php?title=Main_Page .

    Magmi’s speed is very evident whenever you import a large number of SKUs. We’ve seen import speeds of as many as 2-3,000 products per minute. The speed depends on such things as the number of fields to be imported and whether images are imported from the same server or from remote URLs.

    You can also build scripts to automatically run that could pull a file from a remote server and update the products using a cron job.

    image tutorial in MAGMI is here -> http://wiki.magmi.org/index.php?title=Image_attributes_processor

    in magmi you can use CSV or direct SQL. Store images in DB or in files.

Your Answer

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

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