How to import product images into Magento 2?
It can be an ugly mess if you start importing product images into Magento 2 one by one. Here are two simpler ways you can load all the product images in bulk:
- import product images from the local server;
- import product images from the external server.
You can also save yourself the trouble completely. With Magento 2 Product Attachments module, you ‘ll be able to add a range of files to your product pages.
Magento 2: Import product images from the local server
The product images import will take place in two steps here.
Step 1: Upload product image files on local server
Upload the image files to the default folder for importing product images. Normally, you may use this path: pub/media/import. However, a different folder can be specified for the files on Magento server and the new path can be defined during the importing process.
Step 2: Import images to CSV
Then you should enter the name of each image file that needs to be imported on the relevant row in the CSV data (by SKU, and image type: base_image, small_image, thumbnail_image, additional_image).
- The CSV file should contain only the SKU column and the related image columns. Therefore, if you need to import multiple product images for a single SKU, put in a blank row below the SKU to enter all the additional image file names in a definite column;
Check if a correct path is specified before each image file name to the import directory. E.g.: pub/media/import/image.jpg;
Carry out instructions in the importing products section before filling in the Images File Directory field;
Then add the path to the folder (in which you upload the images) to the beginning of the Images File Directory field and go on importing product image files. [Admin Panel>System>Import>Product>Import>File to Import]:
Magento 2: Import product images from the external server
The product images import will take place in two steps as well. For the Step 2 follow the instructions from the Import images to CSV from the local server shown above.
Step 1: Upload product image files on external server
Upload the image files to be imported to the chosen folder on the external server. Fill in the complete URL for each image file in the CSV data (by image type: base_image, small_image, thumbnail_image, additional_image). E.g.: https://example.com/images/image.jpg.
Once it’s done, save the changes and clear the cache.