How to Import Product Images in Magento 2
If you are a continuous reader of my blogs, you already know how to import products in Magento 2. However, the admin also requires to add product images and add its image type each time while creating the products in Magento 2 store.
To make the task easier, I’ve compiled two time saving and effortless methods to import product images in Magento 2 via CSV file!
The CSV file has the file name and the path of the product images. Also, the imported files are uploaded to the corresponding path on the local or external server.
As we know, Magento follows directory structure and the images are placed in alphabetic order. However, you are free to import all the images without specifying the path as it is managed automatically. All you have to do is enter the relative path to the import directory before importing the file name of each image.
Note: It is compulsory to login and have the correct permissions to access the Magento folder on the server for uploading an image.
Methods to Import Product Images in Magento 2:
- Import Product Images from the Local Server
- Import Product Images from External Server
I’ll show each method in detail,
Magento 2 Import Product Images from the Local Server
- Upload image files to pub/media/import folder on Magento server: [magento installation folder]/pub/media/import. If you use another folder, do specify the path to the folder while the import process.
- In the CSV data, enter the name of every image file to be imported on the correct row, by SKU, and in the correct column according to image type (base_image, small_image, thumbnail_image, or additional_images).Note: If the images are in the default folder, i.e., /pub/media/import, do not include the path before the filename in the CSV data.
- Import product images to Magento 2.
For single SKU with more than one product image, insert a blank row below the SKU, and enter the additional image file names in the proper columns.
Magento 2 Import Product Images from External Server
- Upload the images to be imported to the delegated folder on the external server.
- In the CSV data, enter the full URL for each image file in the right column for image types such as base_image, small_image, thumbnail_image, or additional_images.
For example, http://xyz.com/images/image.jpg - Follow step 2 in the above method.
That’s all for importing product images in Magento 2!
Important tools related to the import function:
Any doubts? I’d be glad to help you out if you mention them in the Comments section below.
Pro tip: You can remove unused images in Magento 2 to save storage and speed up your store.
Feel free to share the tutorial with the fellow developers via social media.
Thanks.
Facing issues with your Magento store or want to add new features? Our Magento Development Services are here to help!
Sanjay Jethva
Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe.
His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.
Prev
How to Speed Up Magento 2 Admin Panel
How to Add Custom Entries To Admin System Configuration in Magento 2
Next