This script was needed to monitor product images on a Magento 2 store. We noticed that sometimes after importing product updates, images which had been working were now missing.

The Magento products were imported using a custom extension from a CSV file which included fields for product images. Images specified in the CSV fields needed to be uploaded to a staging folder on the website so the import process could find and move them to the correct path for Magento to use.

Continue reading