4

One of the products in my store don't have image associated with it, infact image was available on staging server and when moved to production image is no more available. I'm trying to re-upload the image but soon as I hit edit product button it issues following error (warning):

Cannot gather stats! Warning!stat(): stat failed for /var/www/vhosts/example.co.uk/example.co.uk/pub/media/catalog/product/b/u/business.jpg

  • Looks like permission issue. Please check with your hosting provider – Ankit Shah Oct 5 '16 at 1:57
4

It's a bug in Magento2 which can be reproduced by following these step:

  1. Upload an image to product
  2. Delete product image from files (pub/media)
  3. Edit the product in admin panel and you'll see this error

Fix

Fix is provided by Magento team on Github

2

Please run below sql code

SET @file = '/b/u/business.jpg';
START TRANSACTION;
DELETE FROM catalog_product_entity_media_gallery WHERE value = @file;
DELETE FROM catalog_product_entity_varchar WHERE value = @file;
COMMIT;

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.