Magento 2 – Resolve Product Import Issues with Multiple Images

importmagento2product-images

I am trying to import a csv file. But there is one error I do not understand and I do not know how to get over it.
The error message is the follwing:

Product Type is invalid or not supported in row(s): 2,…. (many more rows are affected but all are built the same way)

The affected fields in the csv look like this:
enter image description here

Is this the wrong approach in M2? Should I use the additional_images field instead?

Best Answer

In Magento 2 format of CSV file has been changed. The main difference is:

  • In Magento 1 field values can allocate multiple cells in a column.
  • In Magento 2 field values can allocate only one cell. Delimiter is used for separation.

As for images, you must use:

  • base_image - for base image
  • small_image - for small one
  • thumbnail_image - for thumbnail
  • additional_images - for all other images in format(comma-separated): 2.png,3.png,4.png

To understand format better export some products and take a look into received CSV file.

UPDATE

Answer to comment.

No, it's not a bug.

Every column represents some product EAV attribute.

  • base_image - image attribute
  • small_image - small_image attribute
  • thumbnail_image - thumbnail attribute
  • additional_images - media_gallery attribute

media_gallery contains all assigned images, other attributes just assign role(base, small or thumbnail) to image.