0

As the product images are well organized in shared folders on the server, I prefer having the absolute image path in the CSV file directly. For example this allows for simple one click (almost) imports without having to look for the right folder for a specific brand. This also has the advantage of storing a unique copy of each product images used by multiple production/development installations without having to duplicate them which would occupy much more disc space.

While trying to import product images using an absolute path either with the entire path inside the CSV file, submited through the Images File Directory parameter or both, this error was thrown.

Following Error(s) has been occurred during importing process:

  1. Imported resource (image) could not be downloaded from external resource due to timeout or access permissions in row(s): 1, 2, 4, ...

The ideal solution would allow to import from any web user accessible folder using an absolute path while allowing to store a part or the entire path in the CSV file before the image name.

  • You just have to write directory path in import page like var\your_folder_name which contains images. Magento automatically get all images relavent to your products. – Hardik Visa Dec 31 '16 at 5:39
  • @NewBeeInMagento, I understand this concept and what I'm looking after is to use server absolute paths. Using a path relative to the Magento var as suggested does not allow to share the resources with other Magento installation in the same file system or accessing a parent path, which is my goal. – ElGatito Jan 1 '17 at 6:18
  • you want to get images from other magento ? – Hardik Visa Jan 1 '17 at 8:02
  • The main goal is making Magento Import retrieve the images from anywhere authorized in the server. This also includes other Magento installations. See my response below, as I already accomplish this goal. On the other side I would have like to be able to include the path or a part of it in the CSV file but unfortunately the way Magento upload function is implemented it does not work. Hopefully Magento will add a feature eventually. – ElGatito Jan 1 '17 at 18:55
1

With a small trick, I was able to use an absolute path to import the product images.

Magento way of retrieving the final folder is based on the current Magento installation location, therefore any root based path parameter won't go through. I was able to tric the Magento import system using /../. This allows to reach a parent or even sibling folder on any authorized level as the final path is still based on the current Magento installation folder.

For example, if your import file path is located as below:

/home/user/import/brand/img001.jpg

And your Magento installation location:

/home/user/magento


Then the Images File Directory import setting should be set as follow:

/../import/brand

And inside the CSV file under the base_image attribute column:

img001.jpg

Unfortunately this method still does not allow to include the path or a part of it in the CSV file which would have been better instead of having to input a new path on every import.

I think that Magento still has work to do in regards to their import system. At the time of writing, there is also an issue still present in the version 2.1.3 in which the verification function does not use the same Multiple value separator as the import function for the additional_images attribute. The result is that if any delimiter other than comma is used as Multiple value separator, the validation process will fail.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.