Closed
Description
Unable to import products with external jpeg images hosted on a CDN with dynamic URLs not ending with ".jpg" or ".jpeg", e.g.
http://asset.lemansnet.com/media/edge/8/4/0/840EC331-41BE-4AFF-9392-4A35F2C486A9.png?x=260&y=260&b=ffffff&t=image/jpeg
(This is a real image, and it is indeed a jpeg. Parameters "x" and "y" control image size, "b" - background color)
The same procedure as described below succeeds for a "plain" image URL (verified for
http://cdn.cnn.com/cnnnext/dam/assets/160405140459-06-nba-finals-superlatives-tease-only-large-tease.jpg
)
Preconditions
- Magento 2.2.1 CE, Composer install
- CentOS-7, PHP-7.0.25, NGINX-1.12 + PHP-FPM, Percona-5.7.19
- "2-users" setup as described in the installation manual (usermod -a -G nginx maguser, FPM owned by nginx, sgid on directories)
Steps to reproduce
- Create the following CSV import file:
sku,product_type,attribute_set_code,name,price,base_image
12345,simple,Default,Test,10,http://asset.lemansnet.com/media/edge/8/4/0/840EC331-41BE-4AFF-9392-4A35F2C486A9.png?x=260&y=260&b=ffffff&t=image/jpeg
- Magento > Admin > System > Import:
Entity Type:Products
Import Behavior:Add/Update
Stop on Error
Allowed Errors Count:10
Field Separator:,
Multiple Value Separator:,
Field Enclosure:checked
Select File to Import: the file created in step 1
Images File Directory: (left empty) - Click "Check Data"
Click "Import"
Expected result
- Product "Test", should be created with the base image, as specified in the import file.
- The product should appear in the Admin>Catalog>Products list with the specified base image.
- The image should be downloaded and saved in
~/pub/media/catalog/product/h/t
Actual result
- "Check Data" returns 'File is valid! To start import process press "Import" button'
Import returns the following error:
"Imported resource (image) could not be downloaded from external resource due to timeout or access permissions in row(s): 1" - Product "Test" is created and appears in Admin>Catalog>Products as specified minus image.
- The image is downloaded and saved in
~/pub/media/import
with the file name
httpasset.lemansnet.commediaedge840840EC331-41BE-4AFF-9392-4A35F2C486A9.pngx260y260bfffffftimagejpeg
(verified that it is indeed the right jpeg image file)
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.3 release lineGate 2 Passed. Manual verification of the issue description passedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentThe issue has been reproduced on latest 2.1 releaseThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.3 release