I have a huge catalog and imported images for them by csv file. Unfortunately images are not showing on category page but they are showing on view page.
I executed all the commands such as:
php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex
But could not get images on category page. I also tried to execute:
php bin/magento catalog:images:resize
I took almost 24 hours but this command did not finish successfully.
I observed that when i open that product from admin and just hit save without editing then image of that product shows on category page. Then i thought i should programmatically load each product and save but that idea did not work too.
Need help on it. Could any one provide a code of loading and saving a product just like admin do it or any other alternate?