You can use the following plugin which doesn't require installation if any utility on your server at all which is great because most of the hosting companies won't allow to install utilities especially if you are on shared hosting.
This module uses cron job to compress your Magento catalog images instead of doing on the fly which could slow down your website. In the admin configuration you can define how many product images you want to optimize or compress the images at a time. It also support multiple well known APIs including Resmush.it, ImageOptim and Kraken API.
https://www.scommerce-mage.com/magento-image-optimizer.html
Hope it helps!