Esp32 image transfer not all ftp tcpip packets arrive

You said the packages arrive. Perhaps they are just forwarded with incomplete data after timing out. If you can receive a packet, you can check the CRC. It doesn't matter if there were time outs or not. It also doesn't matter whether the incomplete images are due to transmission errors or time outs. The CRC will catch both situations.

Probably, there is nothing you can do to improve the network performance. That is dictated by the configuration and loading of the network. But you can at least filter images by rejecting bad ones and re-sending them.