This is a (must-use) plugin that optimizes images uploaded to WordPress.
Composer
composer require lstellway/wp-optimize-images
This plugin utilizes the ps/image-optimizer package to optimize images with the supported optimizers. To successfully use this plugin, you will need to ensure the required image optimizer binaries are installed on your system.
This plugin is a small project developed to be included in my personal projects. If there is any further interest or ideas, I am happy to consider them.