thaiphan / magento2-s3

Use Amazon S3 as the file storage solution for your Magento 2 application
MIT License
142 stars 95 forks source link

`bin/magento catalog:images:resize` not working #73

Open lracicot opened 5 years ago

lracicot commented 5 years ago

Description

No thumbnails are generated in a magento instance connecting to an existing database of products. Thus, we must generate them using the bin/magento catalog:images:resize command. However, since the image files are not there (they are on S3), the magento command fails with the following error:

 "File '/var/www/html/pub/media/catalog/product/1/0/xxxx.jpg' does not exist.”

Steps to reproduce

  1. Install magento and magento2-s3 using composer on a new server (in our case, a new ec2 instance) and connect it to an existing magento database with products and images.
  2. Navigate to the catalog and see that thumbnails are not generated. You should see the magento placeholder instead.
  3. If you navigate to the product page and click the image, you should see the image.
  4. Thumbnail for the visited image should now have been generated
  5. Now that we know we are talking about the same issue, try to generate all the thumbnails using bin/magento catalog:images:resize on the new server.
  6. The command should fail with "File '/var/www/html/pub/media/catalog/product/1/0/xxxx.jpg' does not exist.”.

Expected results

bin/magento catalog:images:resize should generate all thumbnails.

Note

Most of our products are imported via a script that does not generate thumbnails. That's why we need bin/magento catalog:images:resize to work. Any fast workaround to see our thumbnails on every M2 instances would be appreciated.

henryk-zaborowski commented 5 years ago

This issue started with Magento 2.3 witch uses gd2 and and ImageMagick to process images. Unfortunately adapters for this libraries are not capable to use any other media storage than "File System".

eddyszucs commented 2 years ago

I'm facing the same issue (magento 2.3.6). Any advice?