13

When run command php bin/magento catalog:image:resize, it stops after few images and shows error.

How fix this?

enter image description here

I tried manually reupload images to this folder after this problem.

enter image description here

  • Check file/folder permission at vendor/magento/module-catalog/view/base/web/images/product/placeholder – Amit Bera Sep 19 '18 at 9:24
  • I tried change folder placeholder permission 755 to 777 but it is same problem. – Peter Sep 19 '18 at 10:02
  • have you fix this error? if yes please add solution. I have same issue. – Jalpesh Patel Nov 2 '18 at 19:08
  • What is the solution for this? Even i am facing the same problem – Nafisa Jun 25 at 7:52
4

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:

var/www/magento/vendor/magento/module-catalog/view/base/web/images/product/placeholder/swatch_image.jpg

However the error implies that it's prepending that location with var/www/magento/pub/media/

Is that intentionally like that or is this problem related to where it's looking for the image?

  • have you got any solution? – Jalpesh Patel Nov 2 '18 at 19:14
  • 1
    how is this an answer? – Andy Jan 25 at 13:41
3

Peter,

It seems you are missing swatch image place holder.

Either upload it from the backend or upload manually to below file path

/home/public_html/vendor/magento/module-catalog/view/base/web/images/product/placeholder

name should be swatch_image.jpg only.

  • You are reading my message? "I tried manually reupload images to this folder after this problem." Check second image. – Peter Sep 20 '18 at 8:12
2

Please Read https://devdocs.magento.com/guides/v2.2/release-notes/ReleaseNotes2.2.6CE.html
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 tried remove folder cache and var content but still same issue. – Peter Sep 19 '18 at 10:31
  • I solved issue removing placeholder folder content files swatch_image.jpg, image.jpg, small_image.jpg and thumbnail.jpg. When restore back to placeholder content files it show same error. But problem is still why it show error for placeholder content files? – Peter Sep 20 '18 at 9:42
  • Because such condition are there in to code that's why. – Pratik Sep 20 '18 at 14:03
2

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.

0

Some Images could not be resized. See log file for details

Example:

5781-R101.png  do not work   ABCDEFG.jpg work
08985-AA01.jpg do not work   ABCDEFH.jpg work

I did not change much on picture only name changes

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.