How to load an image into a collection entry when creating it?

I have a similar scenario where my UI allows images to be uploaded as part of a collection creation/update.

First I upload the Image(s) using a similar REST call to what you use. The response is an array with Image IDs - so I extract the image IDs from the response ready for the next call.

For the next call, I pass the Image IDs to the form data.

Hope it helps