Magento 2 Imported Resource (Image) Could Not Be Downloaded: How To Fix This Magento 2 Import Error

- E-Commerce, Magento 2, Our extensions

Magento 2 Development; Magento 2 tutorial

In the following article, we explore a problem that prevents Magento users from importing images. You may be familiar with the Magento 2 Imported resource (image) could not be downloaded from external resource issue. If not, we provide two StackExchange cases and a possible resolution below. Besides, our team developed a dramatically improved way of importing images into Magento 2 which is also described in this article. So, what is Magento’s ‘Imported resource (image) could not be downloaded from external resource’ error, and how to fix it?

Table of contents

Magento 2 ‘Imported Resource (Image) Could Not Be Downloaded’ Error Case Study

As we’ve mentioned above, there are two similar questions posted on StackExchange. Let’s take a closer look at each one.

Case 1

Justin Blayney asks for help here: Magento 2 product import won’t import images. It’s a quite common issue when you use the default Magento 2 import tools. Although we’ve recently received an update of the default data transfer mechanism with the release of Magento 2.3, there is still a huge room for improvement.

So, Justin was importing products using the built-in CSV import. All his data  was imported as expected, but the following error occurred:

The base_image path in his CSV file was http://website.ca/pub/media/import/img/hose/jpg/Ach7938.jpg. He tried to remove the folder structure and edit the CSV – http://mywebsite.ca/pub/media/import/Ach7938.jpg – but it didn’t solve the problem. Even writing the file path as /pub/media/import/img/hose/jpg/Ach7938.jpg didn’t help.

Neither the 775 permission on folders and files nor PHP 7 instead of 5.6 helped.  Luckily, we know the resolution, but let’s take a look at the second case.

Case 2

User3478148 has the same issue. He posted about the problem here: Magento 2 import products with images. The user was trying to import a CSV file with new products that contain local images. The situation is absolutely similar to the first case. As a result, he faced the following error:

The user tried the following, but none of it fixed the problem:

  • He located the images in the pub/media/import folder according to the documentation;
  • He changed the chmod of images to 777;
  • The CSV file was UTF-8 (but we know that it should be UTF-8-BOM);
  • He removed the image path from the CSV, using the file name only (e.g., 12356.jpg);
  • The user also checked categories to make sure they match the existing ones in his store;
  • And adding other image fields instead of just ‘base_image’ didn’t help;
  • Finally, he tried to turn the CSV file into one line.

If nothing of these fixes helped, what is the resolution?

How to Solve ‘Imported Resource (Image) Could Not Be Downloaded’ in Magento 2

As mentioned above, we’d like to explore the resolution provided on StackExchange first and then proceed to our own advice.

StackExchange

As Emipro Technologies Pvt. Ltd. mentioned, it is necessary to put images in the Magento root/pub/media/import/ directory. For instance, it can be ‘magnetoroot/pub/media/import/12356.jpg’ or something similar. And don’t forget to specify a base_image in your CSV with a slash – ‘/12356.jpg’ or similar.

Firebear

Magento 2 Product Import Export Tutorial

To download images for your CSV file, upload them to your Magento 2 root folder – ‘/pub/media/import’ as mentioned above. If images are provided in a zip file, don’t forget to extract them.

As for columns (attributes) of a CSV file that contain information about images, they are:

  • base_image – an attribute that includes the main product image and path. Upload your base image to /pub/media/import. The path of /sample_data/m/b/mb01-blue-0.jpg has the following structure: /pub/media/import/sample_data/m/b/mb01-blue-0.jpg.
  • additional_images – is another product attribute that allows importing a product media gallery. Note that additional images should be separated with commas. You should also upload them to /pub/media/import. The path of /sample_data/m/b/mb01-blue-0.jpg has the following structure: /pub/media/import/sample_data/m/b/mb01-blue-0.jpg.          

For further information, check this article: The Complete Guide to Magento 2 Product Import / Export. A more in-depth exploration of this case is available here: How to Import Product Images into Magento 2 in Bulk. But there is even a better option that is described next.

How to Import Images to Magento 2 Without Errors

Magento 2 mysql data import

As Magento developers, we were always dissatisfied with the quality of the default import and export tools of the platform. One day, our discontentment motivated us to change the ecosystem by providing our own import and export solution. Meet the Improved Import & Export Magento 2 extension – your number-one time saver when it comes to data transfers of all kinds.

With our module, you are not bound to the default import procedure and sources. The extension provides the ability to upload images from data files (not only CSV but also XML, JSON, and other formats) via FTP/SFTP, Dropbox, or URL. Alternatively, you can rely on intermediary services and direct API transfers.

The algorithm behind importing images with the help of Improved Import & Export is quite simple:

  • Go to System -> Improved Import / Export -> Import Jobs and add a new job.
  • Configure General Settings.
  • In Import Settings select Products from the Entity drop-down.
  • Specify Import Behaviour.
  • In Import Source, specify a path to your images depending on the selected import file type and source.

Magento 2 Improved Import & Export Features

Magento 2 oracle import

Now, we’d like to draw your attention to multiple other features of our module as well as shed light on the ones mentioned above.

The Improved Import & Export extension is designed to turn your Magento 2 admin into a central hub where you control all integrations. Consequently, such basic task as importing product images is not a problem for our module. The tool is designed to establish direct connections and data flows between your Magento 2 store and external systems. And as an administrator, you get an opportunity to manage all integrations right in your backend.

The Improved Import & Export extension has already become a number one data transfer tool for hundreds of merchants all over the world providing them with the opportunity to seamlessly exchange information between their stores and any external systems. Let’s see how our tool simplifies a daily import and export routine.

Automated Import & Export Processes in Magento 2

With the Improved Import & Export module, you can fully automate the import of product images, products, and other entities. Our extension provides the ability to leverage two different ways of automated data transfers: schedules and event-based triggers. You configure the necessary options, and the plugin does everything for you.

Schedules

Our extension lets you use the default cron syntax to create update schedules. The Improved Import & Export module provides the ability to specify any custom intervals showing excellent flexibility. Thus, you can create a schedule that is suitable for your specific business conditions. At the same time, we offer a list of predefined intervals. Note that they are fully customizable as well. It means that you can select a value and change it in accordance to your needs.

Alternatively, the extension lets you use profiles that have no schedules. Although they are not the most efficient solution for continuous integrations, it is possible to leverage unscheduled jobs for data migrations or asynchronous updates.

Another important feature provided by the Improved Import & Export Magento 2 extension is the ability to launch every scheduled profile manually. Thus, asynchronous updates can be streamlined when a partner provides a file after a scheduled update so that you can transfer it into your database manually within just a few clicks. It is no longer necessary to wait for the next planned import event.

As for the configuration of a schedule, it is quite a straightforward procedure:

Events

As for event-based triggers, Improved Import & Export implements real-time updates with their help. Create and configure a trigger with corresponding conditions to synchronize two systems more precisely right after a certain action takes place. For instance, you can create the following scheme:

  • A customer places an order ->
  • The module considers this event a trigger ->
  • And launches an order export procedure ->
  • Providing data to an external system.

The same approach can be applied to import processes. For further information, read this article: How to Run Magento 2 Import or Export After Specific System Event or Process.

Advanced Mapping Features for Third-Party Data in Magento 2

As for mapping opportunities, the Improved Import & Export Magento 2 extension provides several exclusive features that dramatically simplify every data transfer. You no longer need to edit attributes and their values manually in a data file. Furthermore, our module offers handy tools for matching categories and generating missing elements of a data file. Once configured, a mapping scheme is saved and utilized for further updates.

Mapping Presets

The most user-friendly way of matching external attributes to ones used internally is represented by mapping presets. Our team developed a series of predefined mapping schemes that provide the ability to reduce attribute matching to a few clicks only. Select and apply a preset related to your integration, and the Improved Import & Export Magento 2 extension will do all the work for you.

The module analyzes the input data that contains external attributes and matches it to the internal designations. No manual interaction with data files is needed. And as we’ve just mentioned, the procedure should be done only once. The algorithm of applying a preset is as simple as the following process:

Matching Interface

Another important mapping tool is a matching interface. It is designed to enable manual attribute mapping right in the Magento 2 admin in the most intuitive way. If a certain preset is not available, you can use this tool. Manual matching via our interface looks as follows:

As for the third column from the gif above – “Default Value” –  it is used to specify hardcoded (default) values. Under default values, we assume attribute values are provided to every item related to the attribute. Thus, you can link products from different store views to a single one, specifying it as a hardcoded value.

Attribute Values Mapping

The Improved Import & Export Magento 2 module lets you match not only attributes but also their values. This feature is beneficial since incorrect values may prevent import processes. In the case of the default Magento tools, you can edit third-party attribute values only manually in an editor, but the Improved Import & Export Magento 2 extension provides the ability to do that way more efficiently.

Attribute values mapping with Improved Import & Export is exceptionally straightforward: choose a third-party designation and specify a corresponding internal one in front of it. As you can see, the procedure is similar to the attribute matching described above. You have to repeat values matching until no external designations are left. For further information, check this article: Attribute Values Mapping.

Attribute Values Editing

In addition to the tool above, the Improved Import & Export Magento 2 module offers the ability to modify attribute values via bulk actions. The extension provides the following rules:

  • Add a prefix to multiple attribute values;
  • Add a suffix to multiple attribute values;
  • Split multiple attribute values;
  • Merge multiple attribute values.

Note that you can freely combine these rules as well as create various conditions to increase the efficiency of editing. You can find more information in this article: How to Modify Attribute Values During Import and Export in Magento 2.

Category Mapping

In addition to attributes and their values, the Improved Import & Export Magento 2 extension provides the ability to map categories. The feature is especially useful in case of product data transfers from external stores with unique catalog structures. In this situation, some items may be bound to categories that are not represented on your Magento website. Thus, you need to edit them manually or apply changes after the data is imported. But our plugin offers a more efficient way of achieving the same goal.

While you spend tons of time and effort on manual editing, the Improved Import & Export extension provides the ability to match external product categories to ones used internally much faster right in the import profile. With our module, the procedure looks as follows:

Note that you can even create new categories on the fly. You have to select a parent category and specify a new one. Next, the Improved Import & Export Magento 2 extension will add a missing section to your catalog. Both features are described here: Category Mapping.

Attributes On The Fly

If an update file doesn’t contain all the necessary attributes, the import process can be interrupted unless you use the Improved Import & Export Magento 2 extension which lets you create attributes on the fly. Use the following general form to specify all parameters necessary to get all the missing elements automatically:

Attribute|attribute_property_name:attribute_property_value|…

For further information, read this article: Product attributes import.

Extended Connectivity Options for Magento 2 Import and Export

In this chapter, we shed light on features that dramatically extend the default opportunities regarding image import. With the Improved Import & Export Magento 2 extension, you can use different ways of transferring all possible information to your e-commerce store including product images. While the default platform offers only one way to synchronize the data flow between your e-commerce store and external systems – CSV files – our module not only provides several more approaches to do so but also offers an extended range of supported file formats. Let’s see how to import images seamlessly.

Multiple File Standards

With the Improved Import & Export Magento 2 extension, you can import images using CSV, XML, JSON, ODS, and Excel files. You still have to upload them to a folder or provide a link, but information about them can be specified via lots of new file formats. And it is possible to apply all features described above to any of them.

Multiple File Sources

Another important improvement related not only to images but also data files is support for multiple sources. The Improved Import & Export Magento 2 extension provides the ability to leverage several different connection options:

  • FTP/SFTP. Transfer files and images using your local server or a remote one.
  • Dropbox. A Dropbox account can also be used if necessary.
  • URL. For import processes only, it is enough to specify a URL of a file or image source.

If your update is provided as a compressed file, you don’t need to extract it. The Improved Import & Export Magento 2 extension will do everything for you right during the import procedure.

Alternative Ways of Import & Export

Another prominent feature of the Improved Import & Export Magento 2 extension is the ability to create API integrations or use intermediary services to exchange data instead of transferring data files.

With the extension, you can connect your website to an external system via REST, SOAP, and GraphQL APIs. And API connections are more powerful than file transfers since they support all the module’s features – mapping, scheduling, category matching, and attributes on the fly – and offer extended flexibility. As a result, you can fully automate data transfers for the most demanding integration.

As for intermediary services, the Improved Import & Export Magento 2 extension supports Google Sheets, Office 365 Excel, and Zoho Sheets. These online sheets provide the ability to exchange data between your website and external platforms faster and with less effort in comparison to data transfers. You can see the integration based on Google Sheets below:

Magento 2 Google Sheet import

Watch the following video to see the extension in action:

Magento 2 Product & Product Image Import FAQ

How do we import product images to Magento 2?

To import product images for your CSV file, you need to upload them to your Magento 2 root folder – ‘/pub/media/import’. If the files are compressed, don’t forget to extract them. Also, note that a CSV file that contains information about images should have the following two columns:
base_image – an attribute that includes the main product image and path. For instance, the path of /sample_data/m/b/mb01-blue-0.jpg has the following structure: /pub/media/import/sample_data/m/b/mb01-blue-0.jpg.
additional_images – an attribute that allows importing a product media gallery. Don’t forget to separate additional images with commas. For instance, the path of /sample_data/m/b/mb01-blue-0.jpg has the following structure: /pub/media/import/sample_data/m/b/mb01-blue-0.jpg.

How do we import products to Magento 2?

You can use the default Magento 2 instruments to import products to Magento 2. However, it is necessary to prepare your import file according to the requirements of Magento 2 before you initiate the transfer. Also, you may need to upload product images under ‘/pub/media/import’. Note that the default import tools of Magento 2 cannot satisfy complex import and export needs. For instance, they don’t let you automate the data transfer processes, cannot transfer data via API or from Google Sheets, etc. Therefore, you need to use additional solutions, such as Improved Import & Export. Contact our specialists to get a consultancy regarding your export needs and the tools that can satisfy them.

How do we import products to Magento from CSV?

If your inquiry regarding the Magento 2 product import is more specific and you need to transfer several products via a CSV file, the standard import solution available in your administration should satisfy them. Basically, it is the only way to move products to Magento 2. But you need to edit a CSV file following the Magento 2 requirements to make it suitable for the system. As for the Improved Import & Export extension, it provides the ability to import any provided file applying changes afterward right within the extension. There is no need to open a CSV file in an editor. Besides, you can import product data in files of other formats.

How do we import multiple product photos in CSV to Magento 2

As we’ve already mentioned, it is impossible to import images in a CSV file directly. You use a data file to provide Magento 2 with a path to product images. If you use the default instruments, product photos should be unzipped and uploaded to your Magento 2 root folder /pub/media/import.

How can I import products and images from hollister.com to Magento?

There is a universal algorithm for all similar operations. You need to export data from an external platform, edit it, save the output in a CSV format, and then provide it to Magento 2 with the help of the default import instruments. If you use the Improved Import & Export extension, the process becomes way more user-friendly. We describe it in the answer below.

How do we auto-import products and product images from Aliexpress and Amazon into Magento?

The Improved Import & Export Magento 2 extension lets you import products from external platforms to Magento 2 automatically. The module provides the ability to use cron to run data transfers on schedule. Instead of manually editing external files to make them suitable for Magento 2, the extension lets you apply mapping within your administration. You create the corresponding mapping scheme once and the system uses it for all further uploads. As a result, you can auto-import products and product images from Aliexpress and Amazon into your e-commerce website using Improved Import & Export.

How do we import related products and product images to Magento 2?

Magento 2 lets you import and export related products, upsells, and cross-sells. Use the following attributes: related_skus, crosssell_skus, and upsell_skus – products SKUs separated with commas (e.g. 24-WG085_Group,24-WG086,24-WG083-blue,24-UG01). As for product images, you transfer them as usual along with products.

How do we update existing products and product images on import?

Choose the Add/Update import behavior in Magento 2 import settings to update existing products and product images on import.

How do we import configurable products with product images to Magento?

The import of configurable products into Magento 2 is a complex procedure. However, you can easily transfer them along with product images, following the recommendations provided in this article: Magento 2 Configurable Product Import.

How do we import products and product images from Magento 1 to Magento 2?

The system lets you transfer products and product images from Magento 1 to Magento 2 via a CSV file. The default import tools are enough to complete this task:
– Export data from Magento 1;
– Edit it according to the Magento 2 requirements;
– Import the file into your Magento 2 website.
However, you can use the Improved Import & Export Magento 2 extension to automate this process. Contact our specialists for further information.

Final Words

As you can see, Magento’s ‘Imported Resource (Image) Could Not Be Downloaded’ error is not a huge problem especially when you use the Improved Import & Export Magento 2 extension. Our module not only offers the ability to import product images in a more user-friendly manner but also automates all data transfers. Furthermore, you can get the necessary information right from an external system via API. For further information about the module and its import functionality, follow this link:

Get Improved Import & Export Magento 2 Extension