When run command
php bin/magento catalog:image:resize, it stops after few images and shows error.
How fix this?
I tried manually reupload images to this folder after this problem.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
I'm experiencing the same problem and I can confirm that the script is prepending [webroot]/pub/media/ to the path of the image it wants to resize and therefore can't find it.
Thus, it's not a solution to add an image to that path since the path does not exist.
Anyway, you can still just ignore the error and skip the batch resizing. The result will be the same as after emptying the image cache from the admin interface.
In consequence, resized images will be generated on demand for each product when the product (detail page) is viewed by a frontend user for the first time. This will slow down performance for the first impression of each product's detail page. Apart from that, there should not be any negative consequences.
I noticed the path in my error message looks strange and yours looks the same with slightly different folder names.
File '/var/www/magento/pub/media/var/www/magento/vendor/magento/module-catalog/view/base/web/images/product/placeholder/swatch_image.jpg' does not exist.
The second half of that path is real and the image is there:
However the error implies that it's prepending that location with
Is that intentionally like that or is this problem related to where it's looking for the image?
The catalog:image:resize command execution time has been reduced by up to 90% in the release. However, this improvement necessitates these additional steps after upgrading your Magento instance to 2.2.6:
Remove pub/media/catalog/product/cache . (Removing this folder frees up space.)
Run bin/magento catalog:image:resize to generate a new image cache. (This step is necessary because we’ve changed the path to cached images and must remove the previously cached images.)
I fixed it by uploading the placeholder images in the backend. https://docs.magento.com/user-guide/catalog/product-image-placeholders.html
The cause of the problem maybe was that we recently moved the site to a new server with new paths.