Please provide the following:
- SDK Version: 34.0.0
- Platforms(Android/iOS/web/all): iOS
I want to retrieve images from the camera roll in both base64 format as well as the uri. Currently, the ImagePicker from expo-image-picker seems to fetch only in one of the two formats at a time.
const pickImage = async () => {
let result = await ImagePicker.launchImageLibraryAsync({
mediaTypes: ImagePicker.MediaTypeOptions.All,
allowsEditing: true,
aspect: [4, 3],
quality: 1,
base64: true,
})
if (!result.cancelled) {
setImageSource(result.base64)
}
}
If I were to unspecify base64: true
from the property, the ImagePicker fetches the uri of the image. If I were to include base64: true
, only the base64 encoded format is fetched.
How do I get both the uri and base64 at the same time?