Magento 2 problem importing external images from csv
-
05-03-2021 - |
Вопрос
I have Magento 2.2.8 and need to import lots of products, the problem is with images (I would rather not import all image files, but a reference via link). They are in an external URL and CSV file check complaints:
Imported resource (image) could not be downloaded from an external resource due to timeout or access permissions in a row(s): 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Csv has base_images like:
http://otherdomain.com/images/123/123.jpg
http://otherdomain.com/images/alfa/alfa.jpg
http://otherdomain.com/images/randomname/randomname.PNG
I have also tried adding the external server as the "Images File Directory", however then I get:
Wrong URL/path used for attribute image in a row
So far found: Import image from external url <-- that copies images
Magento 2: Import categories images external url via csv <-- for categories
Can images be linked to that external server?
If not, what workarounds are suggested?
Thanks.
Решение
The short answer is that external linka can't be done easily
This is sort of covered here
https://magento.stackexchange.com/a/154803/70343
But basically magento needs a local copy to create cache
Unless you simply mean that magento will need to fetch from a url and then store locally.
In which case as per docs just provide full path in csv import
https://docs.magento.com/m2/ce/user_guide/system/data-import-product-images.html
http://example.com/images/image.jpg
Providing nothing gets in the way source side (leech protect or whatever) this should work.
Images will be local though.