Here’s our ImageManipulator code (Using Expo SDK 26)
let main = await ImageManipulator.manipulate(
uri,
[{ width: 1024, height: 1024 }],
{
compress: 1,
format: 'jpeg'
}
)
let thumb = await ImageManipulator.manipulate(
uri,
[{ width: 128, height: 128 }],
{
compress: 1,
format: 'jpeg'
}
)
const profilePicture = {
fullsized: main.uri,
thumbnail: thumb.uri
}
When we send the profile pictures to our server, we get two images of the original size, with no compression done. Instead of an image of size 128x128 and 1024x1024.
Yes, we’re sending profilePicture.fullsized
to our API and not the uri
from the ImagePicker.
Note that using the Base64 information from the ImageManipulator shows the correct image after resizing.