Magento 2.3.3. error in command catalog:images:resize
-
07-04-2021 - |
Pregunta
Some images are missing in products, and I have tried running bin/magento catalog:images:resize
like this:
php -d memory_limit=-1 -d max_execution_time=86400 bin/magento catalog:images:resize
after some time command returned this error:
3241/5308 [=================>----------] 61% 16 mins 52.0 MiB | /import/media/catalog/product/4/t/4tu60ear_.jpgimage pages are not coalesced `/usr/www/users/xxxxx/pub/media/catalog/product/import/media/catalog/product/4/t/4tu60ear_1.png' @ error/layer.c/OptimizeLayerFrames/1027
I have checked and files exist in their locations and can be opened in the browser.
- Is the error above related to the fact that some product images are missing
- What would be a solution for the error - or at least - what to do?
UPDATE
Digging more, I found out that I have images of the same filename, but different extensions.
pub/media/catalog/product/import/media/catalog/product/4/t/4tu60ear_.jpg
pub/media/catalog/product/import/media/catalog/product/4/t/4tu60ear_.png
pub/media/catalog/product/import/media/catalog/product/4/t/4tu60ear_1.jpg
pub/media/catalog/product/import/media/catalog/product/4/t/4tu60ear_1.png
So I deleted .png
files and tried my command for resizing again. This time it went further until it reached the same batch of the same filename/different extension.
Solución
I'll post how I have resolved this in case anyone finds it helpful.
Since webshop imports products from partners, all images are also imported daily.
We have decided that the simplest thing would be to delete all images from cache and empty tables:
catalog_product_entity_varchar
catalog_product_entity_media_gallery
After that, we ran the import again and ran the command again.
This helped us to free space on storage, as well as database size.