1

Recently I have migrated the magento-1 (ver: 1.9.1.1) data to magento-2 (Ver: ver: 2.1.2) fress version using data migration tool. And it working perfectly in our local computer (localhost).

I found an issue after upload it to server m2.hiddencamera.com.au that some product images not showing instead it showing blank image (http://m2.hiddencamera.com.au/hidden-cameras?cat=84). And this problem is for not generating the image cache in pub/media/catalog/product/cache/ folder.

But when I try to regenerate the image using php bin/magento catalog:image:resize it showing a warning;

Warning: imagecreatefromjpeg(): gd-jpeg, libjpeg: recoverable error: Premature end of JPEG file in /vendor/magento/framework/Image/Adapter/Gd2.php on line 65

However in the mean time before showing the Warning it generate some new images cache in the /pub/media/catalog/product/cache folder.

I have tried to show the new generated images after setup:upgrade, indexer:reindex, cache:clean, cache:flush But it not updating the missing image url for the new generated images cache.

Also I have contacted with the hosting support (siteground) but no luck.

Additional Information

  • Upgraded M2 Ver: 2.1.2
  • Migrated from: 1.9.1.1
  • PHP Version: 7.0.21
  • memory_limit: 768M
  • max_execution_time: 120

N.B: I have checked after migrated the Magento1 data to Magento ver: 2.1.7 that it causing the same issue when upload to server, but working properly in localhost.

I don't know exactly where the problem is. Please help me to resolve the issue for regenerating the product images.

Regards,

Your Answer

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

Browse other questions tagged or ask your own question.