cancel
Showing results for 
Search instead for 
Did you mean: 

calalog:image:resize not all images are resizing

calalog:image:resize not all images are resizing

Hello guys,

 

My magento store (2.3.1) has over 800,000 products. When I try to tun bin/magento image:catalog:resize it does resize only for 206905.

 

Any solution for this?

 

resieze.PNG

7 REPLIES 7

Re: calalog:image:resize not all images are resizing

Hi @ChathuraMK,

calalog:image:resize command resize the images which are associated with the products. There may be rest images are not associated with any product.

Because when you delete any product then product image doesn't delete from file system by default.

You can check associated images count from catalog_product_entity_media_gallery table.

select * from catalog_product_entity_media_gallery;

I hope it will help you!

Re: calalog:image:resize not all images are resizing

Did you check the images count in database table?

Re: calalog:image:resize not all images are resizing

Hi @Vimal Kumar ,

 

thank you for your reply. There are 505652 records in catalog_product_entity_media_gallery  table.


Re: calalog:image:resize not all images are resizing

@ChathuraMK,

It means command is showing correct results.

Basically it pick the images:

1. If you imported products which might have variable sized images
2. If images were resized or deleted manually from cache

Re: calalog:image:resize not all images are resizing

@Vimal Kumar ,

 

if you see command is showing only 206905 results

Re: calalog:image:resize not all images are resizing

@chathuramk,

There may be many resons for this. As I mentioned in my previous post.

May be duplicate as well. 

Check once real records count with below mysql query. 

SELECT * FROM `catalog_product_entity_media_gallery_value_to_entity`

There may be some disabled products as well. 

Try once records count with above query, then we can check real records as well after filter with same query for enabled products. 

Re: calalog:image:resize not all images are resizing

For enabled product query count for gallery :

SELECT count(*) FROM `catalog_product_entity_media_gallery_value_to_entity` where entity_id not in(
SELECT entity_id FROM `catalog_product_entity_int`
WHERE attribute_id = (
    SELECT attribute_id FROM `eav_attribute`
    WHERE `attribute_code` LIKE 'status'
) AND `catalog_product_entity_int`.value = 2
)