You can access the script here (https://mkjcentral.website/jpgoptimizer/).
The 'About' link displays various info on how to use the script.
I have upgraded the script to include BMP images. These are also converted to JPG when compressed. It can now handle: JPG, JPEG, PNG, GIF, WEBP and BMP images.