I am trying to solve a backend warning which is shown whilst trying to edit any configurable or simple product in my Magento 2 backend. The warning is:

Cannot gather stats! Warning!
stat(): stat failed for /opt/lampp/htdocs/magento2/pub/media/catalog/product/t/a/sample_image.jpg

I've seen the discussion here with regard to this problem to attempt to resolve this warning. However I don't want to change my core files. Is there any other option to solve this?


Please run below sql code

SET @file = '/t/a/sample_image.jpg';
DELETE FROM catalog_product_entity_media_gallery WHERE value = @file;
DELETE FROM catalog_product_entity_varchar WHERE value = @file;

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.