To optimization of images is done by the underlying spatie/image-optimizer package. You can pass your own customized chains as array. The keys should be fully qualified class names of optimizers and the values the options that they should get. Here's an example
If you need more control over the optimizer chain, you can still pass your own instance of OptimizerChain. It can be especially useful if you need to set a custom timeout or a custom binary path. You may not have enough privileges to install the necessary binaries on your server but you can still upload some precompiled binaries.