How to Import Product Images in Magento 2

by Van Nguyen

When creating products, administrators need to add product images and also select appropriate image types manually. Therefore, why don’t we implement Magento 2 import images 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 article, we want to give you a detailed tutorial about how to import images Magento 2 by only a CSV file.

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 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 for Magento 2 bulk image upload via a CSV file.

Magento 2 Import Images from the Local Server

  • Step 1: You need to upload the image files to pub/media/import folder on the 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.
import images magento 2 - csv file

The CSV file to import images 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: Implement Magento 2 Import images

You do default steps as in this Import tutorial we already provided before for Magento 2 bulk image upload.

import images magento 2 - 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 multiple import images Magento 2, 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 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.

GRAB 8+ Useful Tips to Optimize Images in Magento 2 

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

BSS Commerce is one of the leading Magento extension providers and web development services in the world. With experienced and certified Magento developers, we commit to bring high-quality products and services to optimize your business effectively. Furthermore, FREE Installation – FREE 1-year Support and FREE Lifetime Update are awesome policies you shouldn’t miss when using any of our Magento extension.

CONTACT NOW to let us know your problems. We are willing to support you every time.

Magento-2-import-export

Next Reading Suggestions

© 2019 BSS Commerce owned by THANH CONG INTER ., JSC. All Rights Reserved.
Business registration certificate no. 0106064469 issued by Hanoi Department of Planning and Investment on 19 December 2019.
Legal Representative: Mr. Nguyen Quang Trung.