79753382

Date: 2025-09-02 10:42:51
Score: 0.5
Natty:
Report link

@Aytac No need to downgrade version. As manipulateAsync() function is deprecated now but we can apply SaveOptions with the help of saveAsync(options: SaveOptions) function using ImageManipulatorContext in expo-image-manipulator version ~13.1.7 (latest as of today).

As per official documentation We can do something like this -

const imageRef = await ImageManipulator.manipulate(imageUri)
.resize({
    width: 640,
    height: 480,
})
.renderAsync();
const manipResult = await imageRef.saveAsync({
    compress: 0.8,
    format: ImageManipulator.SaveFormat.JPEG,
});
setManipulatedUri(manipResult.uri);

Explanation:

We have to get ImageRef provided by renderAsync() function which will return Promise<ImageRef>.

const imageRef = await ImageManipulator.manipulate(uri).renderAsync();

Now on ImageRef we can apply SaveOptions with the help of saveAsync(options: SaveOptions) function.

const manipulationResult = await imageRef.saveAsync(options: SaveOptions);
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Aytac
  • Low reputation (0.5):
Posted by: codegsaini