Photonized is an on-the-fly image resizer and optimizer that works on docker container. It's dead simple; you only need docker & docker-compose.
git clone https://github.com/mustafauysal/photonized.git
cd photonized
docker-compose up -d
Photonized exposes port 80 and 9001. If you don't want to use proxy caching, use 9001 instead of 80.
Proxy Cached resize: http://127.0.0.1/uysalmustafa.com/wp-content/uploads/2019/04/ca-2016-1024x767.jpg?w=200
Resize without caching: http://127.0.0.1:9001/uysalmustafa.com/wp-content/uploads/2019/04/ca-2016-1024x767.jpg?w=200
Detailed documentation is available on https://developer.wordpress.com/docs/photon/