react-native-multiple-image-picker icon indicating copy to clipboard operation
react-native-multiple-image-picker copied to clipboard

Images from baronha/react-native-multiple-image-picker not displayed in ImageBackground on Android and ios

Open jazzylamba opened this issue 11 months ago • 0 comments

ImageBackground does not display images when provided with content:// URIs. This issue occurs when attempting to use images from Android's media storage. When using the react-native-multiple-image-picker package to select images, the paths returned (e.g., content:// URIs) do not render correctly in the ImageBackground component on Android.

Attempting to use the returned paths (result.path, result.localUri, result.realPath, result.uri) as the source for ImageBackground results in the image not being displayed.

Steps to Reproduce Install and configure baronha/react-native-multiple-image-picker in a React Native project. Select an image from Android's or ios media storage using the package. Use the returned result.path or other URI properties as the source for an ImageBackground component:

<ImageBackground
  source={{ uri: result?.path || result?.localUri || result?.realPath || result?.uri }}
  resizeMode="contain"
  style={{
    height: 300,
    width: 300,
  }}
/>

jazzylamba avatar Dec 31 '24 09:12 jazzylamba