Slow load (5 seconds) only with png-images

This is where the 5-second latency is:

This is the location in the code:

This points towards it not being an issue with Caddy. However, I have a hunch. Do you know if your upstream sets the Content-Length header in its response off PNG files?

After you validate the fact about Content-Length from your upstream app, can you try adding flush_interval -1 inside the reverse_proxy block? Read about it here: