@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);