According to the extension’s functionality, all newly uploaded images will be optimized automatically. Make sure to enable the following setting in Stores > Configuration > Amasty Extensions > Image Optimizer > Automatic Optimization of the Newly Uploaded Images:
Once done, kindly navigate to the Amasty > Image Optimizer > Image Folder Optimization Settings and enable Automatically Optimize Newly Uploaded Images in Folder setting for the pattern created:
Additionally, the Premium version of the extension provides the options to set up an optimization schedule in Stores > Configuration > Amasty Extensions > Image Optimizer > Automatic Image Optimization:
Since v.3.6.0 Premium version of the module introduces Automatically Optimize Existing Images feature, enabling automatic optimization of existing images based on pattern settings (Note: the functionality is available as a part of an active product subscription or support subscription. You can find the 'amasty/module-optimizer-premium-subscription-functionality' package for installing in composer suggest.)
Since v. 3.8.0 Pro and Premium versions of the module introduce a new Image Optimization Strategy > Visited Pages that automatically optimizes images based on the visited frontend pages. (Note: the functionality is available as a part of an active product subscription or support subscription. You can find the 'amasty/module-image-optimizer-visited-pages' package for installing in composer suggest.)Please note, if 'Visited Pages' option is selected, manual optimization based on folders will no longer work.