Importing gallery images seems like such a fundamental function, but I cannot find any column in my csv exported file where I would do this. I created a single product with gallery images through magento's backend and then exported into csv and even those gallery images are nowhere to be found in the csv file.

what am I missing?

  • What do you expect? binary encoded image? The image is in media/catalog/product/<first_letter>/<second_letter>/name.jpg and in the csv there should be the path: /catalog/product/<first_letter>/<second_letter>/name.jpg in the column 'image' afaik Mar 4, 2013 at 18:25
  • sorry @Fabian, I am looking for a cell/ column where I would place the URL for a gallery image so that it can be uploaded
    – YWSW
    Mar 4, 2013 at 18:28

7 Answers 7


Just to clarify, I assume you are using the Import/Export module, NOT Dataflow. If you have been using Dataflow please try the same process with Import/Export module and see if your results improve.

This is definitely standard functionality - please see my linked CSV export from a fresh install of Magento CE with sample data installed. Do a search for small_image and you'll find the correct columns:

image_label, small_image, small_image_label, thumbnail, thumbnail_label

There are also these columns for controlling the media gallery:

media_gallery, _media_attribute_id, _media_image, _media_lable, _media_position, _media_is_disabled

The Magento import/export is tricky, there's no two ways about it. There's basically no documentation and some quirks/bugs that can cause unexpected results. Everyone who knows how to use Mage_ImportExport has most likely spent hours crying into their keyboards at some stage.

That being said, it does work and it does work well once you know the tricks. If you could post your CSV here and maybe tell us if you've made any customisations to your Magento installation then the community will be able to better assist you.

Also, make sure you are not ticking any of the attribute 'skip' checkboxes when you are performing your export.

  • This was my conclusion as well - seperate lines for each gallery image - is there no way to keep one-line-per-product and seperate the images by commas, semicolons, etc. ? I also realized that dataflow was giving me bad column names and info. You are so right about hours crying at the keyboard ;)
    – YWSW
    Mar 7, 2013 at 1:09
  • Yes separate lines for most things, not just for images. E.g. adding your product to multiple categories would mean listing each category on a new line. There are many attributes that use this format. Sorry I can't give you a link to a definitive tutorial/guide - the best way is to look at the CSV I linked above (which has almost every possible product configuration) and replicating the structure in your own file. If ever you need to import stock values or product visibilities be aware there are some bugs in this area. Mar 7, 2013 at 1:20

Just add the following columns to your import CSV

image_label, small_image, small_image_label, thumbnail, thumbnail_label

And set the respective image paths to be relative to ./media/import . Eg

image_label, small_image,
"my_label",  "./img.jpg",

Then upload all your images to be in ./media/import

Categorising imports

If you want to categorise the images, just put them in a sub-directory in ./media/import - and set your path in the CSV to include it.

Eg. You uploaded your images to ./media/import/20130304
So the image path would be ./20130304/img.jpg

  • where would I add the multiple URLs for my gallery images?
    – YWSW
    Mar 4, 2013 at 18:44
  • 1
    Comma separate them. Mar 4, 2013 at 18:45
  • so if I manually create these columns on my product feed and fill them Magento will understand where to put them?
    – YWSW
    Mar 4, 2013 at 18:53
  • How come this does not come standard with magento? and how do I get Magento to export my gallery image URLs?
    – YWSW
    Mar 4, 2013 at 18:54
  • 1
    It is standard. Mar 4, 2013 at 19:04

I took me forever to figure this out so I decided to chime in and possibly provide some help.

• The answer from soft Prodigy is a $99 "fix" to using magmi. • jharrison.au is the correct one and after much working on it I got it to work.

First export and import as he stated has to be done NOT using dataflow. Data flow won't work. From there i had a problem trying to figure out which attributes were needed.

Here is what I did: 1. Set these fields to the following: _media_attribute_id: mine is 80. You can find yours by going to Catalog > Attributes > Manage Attributes > Media Gallery in the URL you'll see the attribute. _media_image I set like this /filename.jpg >>>>>> this has to be in the media > import folder of Magento /filename2.jpg >>>>>> this has to be in the media > import folder of Magento

  1. After you import your product you have to Reindex, this had me frustrated for a while! Go to System > Index management > and Reindex Data

I hope this helps anyone. Sorry if it seems repetitive from the previous posts.


Just a small clue (in addition to the very good answer of jharrison.au) which costs me about hours. It seems to me that the imagefiles have to be named in lowercase letters. Perhaps this information could help somebody.


I agree with great answer of jharrison.au. I would say even more, seems to be no consistency in how DataFlow and Import/Export module behave in different versions of Magento.

For those who are looking for a solution to update big databases (over 10k products) I advise to look into great free open source tool MAGMI. See explanation about the format here.

In short, it's like this:

media_gallery /image1.jpg;/image2.jpg

And you should place your images in "Media folder" directory (must be adjusted in MAGMI)

If you experience difficulties with setting up MAGMI (i know, it might be a bit tricky for non-pros), you can use this extension which is basically a MAGMI integrated into Magento backend for ease of use with some extended functionality. It allows to perform this task just out of box.


1.9 CE you will want to specify in your CSV the sku and gallery which can include a semi-colon ; delimited list with a prefixed forward slash that is relative to the /media/import directory for your files, e.g: /56789.jpg;/43345.jpg. You can also specify the image, small_image and thumbnail image among other fields if you wish, these are the ones I set as a minimum requirement.


Magento can import images to gallery.

Not exactly all the images should be in separate columns. Here is example.

If you upload let's say 5 images for 1 product, in your file you need to place image name with leading slash (/image_name.jpg) in _media_image column (each line for each image) e.g:

enter image description here This are images to one product with SKU If you import images just to gallery you will get them here -

enter image description here But as you can see, none of images are added as main product image.

In Magento main products image is called base and it is sown at product page, small image will be shown at category view and thumbnail (in related products etc)

So to make some or one of your images to be shown as small, base and thumbnail you need to have separate columns and there put image names too

So you can make one and the same image as small, base nad thumbnail or different images.

Let me know if found an issue.

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