You would be converting the images to base64 and then sending it in the request. Can you please verify if the b64 string is fine by comparing them with each other (mostly the mediaType). It should ideally be something like:
data:image/png;base64,someRandomBlob....
This might happen if the mediaType is incorrect in the b64 string.