Ok so to import images you first need these columns:
-
_media_attribute_id
- the attribute_id ofmedia_gallery
(see below) -
_media_image
- the path of the image, i.e./some_image.jpg
-
_media_lable
- the image label, i.e. "My nice image" -
_media_position
- the position, 1, 2 etc -
_media_is_disabled
- whether the image is excluded from the gallery or not
You do the whole weird multi-line thing to import multiple images. Every image
you use (whether it's in the gallery, or being used for the image
, small_image
or thumbnail
) needs to be imported initially using the above fields.
_media_attribute_id
is the most important field, it needs to correspond to the
media_gallery
attribute id, you can find this out by running this SQL:
select attribute_id from eav_attribute where attribute_code = 'media_gallery';
When you have this structure set up correctly, you can put all your iamges in
media/import
and you're all done!
If you want to use any of the images as the image
, small_image
or thumbnail
then just add the same path you entered in _media_image
in the column for the
relevant image.
Posted by Mike Whitby to Magento (2013-06-04 16:25)