How to Import Images From an External URL in Magento 2

- Magento 2

Magento 2 Development; Magento 2 tutorial

The following article explains how to import images from an external URL in Magento 2. You cannot imagine an e-commerce website without product pictures. Uploading visual content elements, however, may be challenging. The more products you have, the more work should be done, especially when you upload each image manually.

Luckily, importing product images to Magento 2 with product data introduces a better way to fill your catalog with content. Instead of uploading pictures to your server and then providing their names during the import process, Magento 2 lets you import images from external URLsAlthough this functionality is possible by default, there are several alternative ways to do so.

Below, we focus on the default approach and one of the alternatives. Let’s see how to import product images to Magento 2 using external URLs.  Check other useful tips here: Magento 2 Cookbook.

How to use external image URLs in Magento 2 product import

Adobe Commerce and Magento Open Source support the import of multiple product photos. Each product picture’s path and file name are typed into the CSV file, and the image files to be imported are uploaded to the relevant path on the Magento or external server.

Magento maintains its own directory structure for product photos, which is alphabetically sorted. When you export product data with existing photographs to a CSV file, the alphabetized path for each image appears before the file name. When you import new photographs, however, you do not need to give a location because Magento automatically controls the directory structure. But you must include the relative path to the import directory before the file name.

  1. Let’s suppose that product images are uploaded to the designated folder on the external server.
  2. In the CSV data, enter the full URL for each image file, like shown below:


    Keep in mind that you should specify external image URLs in the correct column by the following image types:

    1. base_image
    2. small_image  
    3. thumbnail_image
    4. additional_images
      magento 2 import images external url: csv file
      As you can see, there is also a swatch image that has a corresponding column where you can specify image URLs.
  3. Follow the instructions to import product data in our Complete Guide to Magento 2 Product Import / Export.

How to import product images to Magento 2 via external URLs

If you need a more powerful way to import product images to Magento 2 via external URLs, install the Improved Import Magento 2 extension by Firebear. It provides the ability to import them in bulk from remote FTP, Dropbox, or direct URLs! 

Also, you get Magento 2 product image processing settings and configuration. The module lets you crop and scale product images, adjust their size and name, convert them to a different format, and apply various compression and performance optimization tricks.

In addition to that, you will be able to leverage the following things:

  • Schedules. A schedule for import and export processes can help you use external image URLs in automated Magento 2 import and export
  • Mapping. Strong mapping tools empower you with the ability to transfer any custom and third-party data along with external image URLs in Magento 2 import. 
  • Support for all entities. All Magento 2 entities, including those associated with the B2B modules, are supported. 
  • Multiple file formats. Now, you can add external image URLs in Magento 2 import to Excel, Json, and multiple other file formats (not only CSV as in the default import). 
  • Multiple data sources. Use external image URLs in Magento 2 import, uploading them from Google Drive, Dropbox, Google Sheets, and numerous other data sources.
  • API. Create API connections between your e-commerce website and external systems to establish seamless integrations.  

Contact us for further information about the extension. 

Download / Buy Firebear Improve Import Magento 2 Extension