First, install the add-on via concrete5.
Then, to run the optimizers locally, you need server access. Install at least one of the image optimizers on your server, see instructions below.
Then, make sure your PHP installation allows the functions `proc_open` and `proc_close`. You can ask your host, or check the php.ini file, or create a PHP file with '<?php phpinfo();'.
If you don't want to install anything on your server, you can use a cloud optimizer, e.g. TinyPNG. Then you only need to copy the API key to the settings page, and you're good to go.
Optimizers on Ubuntu:
Optimizers on CentOS:
Optimizers on macOS (using Homebrew):