How to import product images into Magento 2

You can import product images into Magento 2 using the Magento 2 Import feature. Here are the steps to follow:

  1. Prepare the images: Make sure the product images you want to import are in the correct format (JPEG, PNG, or GIF) and that they are named according to the SKU of the product they belong to. For example, if the SKU of the product is PROD-001, the main image should be named PROD-001.jpg.
  2. Create a CSV file: Create a CSV file that includes the product SKUs and the file paths of the corresponding images. You can use a spreadsheet program such as Excel or Google Sheets to create the file. The CSV file should include the following columns: sku, base_image, small_image, thumbnail_image, additional_images.
  3. Upload the images: Upload the product images to the correct directory on your server. By default, product images are stored in the pub/media/catalog/product directory.
  4. Upload the CSV file: Upload the CSV file to the root directory of your Magento 2 store.
  5. Start the import process: In your Magento 2 admin panel, go to System > Data Transfer > Import. Select Products as the Entity Type, and choose the CSV file you uploaded. Click on the Check Data button to verify that the data in the CSV file is valid.
  6. Map the image columns: In the Import Settings section, expand the Advanced Settings tab and select the Images File Directory value as pub/media/catalog/product. Next, go to the Images File Mapping section and map the image columns to the correct image types. For example, map the base_image column to the base_image attribute.
  7. Run the import process: Click on the Import button to start the import process. Magento 2 will import the product data and images from the CSV file.

Note that if you have a large number of images to import, the import process may take some time to complete. It’s also important to make sure that the image file paths in the CSV file are correct and that the images are uploaded to the correct directory on the server.