Received following error when running this command. Please let me know if you have a solution.
Notice: getimagesize(): Read error! in /var/www/public/vendor/magento/module-catalog/Model/Product/Image.php on line 420
Hi @kevin0320 and welcome.
In order to provide the best possible answers, can you tell us:
- What version of Magento you’re using?
- Does this error get displayed immediately or after some time?
- Do you use any 3rd party extensions to manage your images?
Using. JustBetter -image optimizer extensión and also cloudflare.
This isn’t an issue that I’ve ever come across before, but I did find a similar issue reported on the Magento 2 GitHub Repo from 2017.
It looks like someone was using a 3rd party extension that had created some broken images (specifically 0kb files). When the
bin/magento catalog:images:resize command was run, it would Error out when it tried to resize the broken images.
At this point, I would check 2 things in the
- Check that file Ownership and Permissions are correct, in case it’s a permissions issue (i.e. the files can’t be read/written by the command)
- Check if you have any odd looking files (e.g. 0kb)