Use Automatic representation for all image pickers (#8963)
This commit is contained in:
@@ -23,6 +23,8 @@ export async function openPicker(opts?: ImagePickerOptions) {
|
|||||||
selectionLimit: 1,
|
selectionLimit: 1,
|
||||||
...opts,
|
...opts,
|
||||||
legacy: true,
|
legacy: true,
|
||||||
|
preferredAssetRepresentationMode:
|
||||||
|
UIImagePickerPreferredAssetRepresentationMode.Automatic,
|
||||||
})
|
})
|
||||||
|
|
||||||
return (response.assets ?? [])
|
return (response.assets ?? [])
|
||||||
@@ -54,7 +56,7 @@ export async function openUnifiedPicker({
|
|||||||
base64: isWeb,
|
base64: isWeb,
|
||||||
selectionLimit: isIOS ? selectionCountRemaining : undefined,
|
selectionLimit: isIOS ? selectionCountRemaining : undefined,
|
||||||
preferredAssetRepresentationMode:
|
preferredAssetRepresentationMode:
|
||||||
UIImagePickerPreferredAssetRepresentationMode.Current,
|
UIImagePickerPreferredAssetRepresentationMode.Automatic,
|
||||||
videoMaxDuration: VIDEO_MAX_DURATION_MS / 1000,
|
videoMaxDuration: VIDEO_MAX_DURATION_MS / 1000,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {Image as ExpoImage} from 'expo-image'
|
|||||||
import {
|
import {
|
||||||
type ImagePickerOptions,
|
type ImagePickerOptions,
|
||||||
launchImageLibraryAsync,
|
launchImageLibraryAsync,
|
||||||
MediaTypeOptions,
|
UIImagePickerPreferredAssetRepresentationMode,
|
||||||
} from 'expo-image-picker'
|
} from 'expo-image-picker'
|
||||||
import {msg, Trans} from '@lingui/macro'
|
import {msg, Trans} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
@@ -97,10 +97,12 @@ export function StepProfile() {
|
|||||||
const response = await sheetWrapper(
|
const response = await sheetWrapper(
|
||||||
launchImageLibraryAsync({
|
launchImageLibraryAsync({
|
||||||
exif: false,
|
exif: false,
|
||||||
mediaTypes: MediaTypeOptions.Images,
|
mediaTypes: ['images'],
|
||||||
quality: 1,
|
quality: 1,
|
||||||
...opts,
|
...opts,
|
||||||
legacy: true,
|
legacy: true,
|
||||||
|
preferredAssetRepresentationMode:
|
||||||
|
UIImagePickerPreferredAssetRepresentationMode.Automatic,
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user