>How to Import Product Images in Magento 2

How to Import Product Images in Magento 2

When creating products, administrators need to add product images and also select appropriate image types manually. Therefore, why don’t we import product images to Magento 2 via a CSV file including necessary image data and product SKU? This method will save much time and effort for store owners or administrators in the process of adding products and managing product images.  

In this articles, we want to give you a detailed tutorial about how to import product images to Magento 2 by only a CSV file.

For more articles about Magento 2 Import functions, please take a look at our series as below:

First of all, I want to explain more about how Magento 2 supports importing product images to help you get a better understanding.

The CSV file contains the path and file name of each product image, and the imported image files are uploaded to the corresponding path on the Magento server or external server.

Besides, Magento has a directory structure for product images, and when exporting product data with available images to a CSV file, the alphabetized path can be seen before the file name of each image. In case, you want to import new images, it is not necessary to specify a path because the directory structure is managed automatically. You just have to enter the relative path to the import directory before importing the file name of each image.

Additionally, it is mandatory to login credentials and correct permissions to access to the Magento folder on the server if you want to upload an image.

After you have clearer information about Magento support, below are the 2 methods we want to introduce you to import product images via a CSV file.

Magento 2 Import Product Images from the Local Server

  • Step 1: You need to upload the image files to pub/media/import folder on Magento server.

[magento installation folder]/pub/media/import

It is also possible to use another folder on the Magento server, but you have to specify the path to the folder during the import process.

  • Step 2: In the row of the CSV file, you fill in the name of each image file to be imported by SKU. In the correct column of the CSV file, you fill the name of each image file by image types such as base_image, small_image, thumbnail_image, or additional_images.
  • magento-2-import-product-image-csv
    The CSV file to import product images to Magento 2

*Note: If images belong to in the default import folder (/pub/media/import), you should not include the path before the file name in the CSV data.

  • Step 3: Import product images to Magento 2

You do default steps as in this Import tutorial we already provided before.

magento-2-import-product-image-settings
Settings to import product images to Magento 2

In Select File to Import: you have to fill the relative path in Images File Directory:

/pub/media/import

In case you have a single SKU but want to import multiple product images, you need to insert a blank row below the SKU, and then enter the additional image file names in the appropriate columns. This means that the additional rows belong to the parent Sku.

Magento 2 Import Product Images from External Server

  • Step 1: You upload the imported images to the specified folder on the external server.
  • Step 2: In the CSV file, you fill the full URL of each image file in the appropriate column which stands for image types such as base_image, small_image, thumbnail_image, or additional_images.

For instance:  http://abc.com/images/image.jpg

  • Step 3You do default steps as in other Import tutorials we already provided before.

Magento-2-import-export