You don’t need (and nor should), convert Base64 images to send images to a remote server.
Should not, because Base64 is not a compression algorithm, it does the opposite, it increases (and quite) the payload weight, maybe that’s why its upload takes so long. Transferring in Base64 when both ends can interpret the same binary format in common is bad practice.
And don’t need because, any server with any application service running that fits, can read the field of binary Boundary to convert it into binary image format (gif, jpg, png, wherever) on the server itself.
If you will upload many images in high quality, ai is already a ANOTHER history. You’ll have to create your own upload strategy so it doesn’t cost you too much networking and interface time until the upload completes. In that case, I would save everything locally and upload in the background slowly using a background task or a secondary operation with the app open.
Ta using Swift or objc? I recommend using Alamofire: https://github.com/Alamofire/Alamofire Look at the Uploading part, it will definitely help you.
– JdsMedeirosBR