Product Import Module for Magento 2 - resizes bigger images - Command Mode - cron import
Command line bulk product import module importing images and any additional attributes. Can be setup as cron job to import products on schedule. Resizes pictures to reasonable size ~ 1000 x 1000 if they are too large.
This module addresses the following problems with Magento 2 import:
- Does not create duplicate images for existing products in Magento pub/media/catalog/product (Only quantity and price are updated for existing products).
- Decreases image size for large images while still keeps image quality good.
- No need to run the bellow command to make images visible after import.
- php bin/magento catalog:images:resize
- Imports additional attributes if they are present in CSV and in the product attribute set that is being imported (attribute name of csv column must match attribute name in magento)
- Some problems with URLs after importing are fixed
- Categories are not created on import. If category specified in CSV is not found, product is imported without being placed in specific cateogry.
- Install module by placing it in app/code folder of Magento
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
- Create a folder magento-root/pub/media/catalog/uploaded - will be used as temporary storage for uploaded images
- To run the script you need to execute the following command: php bin/magento importproducts:import var/importexport/importfile.csv
To setup cron job to import products automatically enter the following command to the crontab
0 1 * * * php magento_home_directory/bin/magento importproducts:import magento_home_directory/var/importexport/importfile.csv