Esp32 image transfer not all ftp tcpip packets arrive

Did you try increasing the FTP timeout?

// you can pass a FTP timeout and debbug mode on the last 2 arguments
ESP32_FTPClient ftp (ftp_server,ftp_user,ftp_pass, 5000, 2);