Issue: Base64 Image Not Rendering Inside Custom Marker (React Native Maps) (related to #5707)
Summary
On Android, when rendering a custom in react-native-maps with a child sourced from a base64 string, the Marker appears but the image does not render. Static local images (require(...)) and remote URL images render correctly. This issue happens only with base64 images and appears on both physical devices and emulators.
Reproducible sample code
<Marker
coordinate={{ latitude: 28.6139, longitude: 77.209 }}
>
<View
style={{
width: 50,
height: 50,
borderRadius: 25,
backgroundColor: 'white',
alignItems: 'center',
justifyContent: 'center',
}}
>
<Image
source={{
uri: 'data:image/jpeg;base64,BASE64_STRING_FROM_API',
}}
style={{ width: 40, height: 40 }}
resizeMode="contain"
/>
</View>
</Marker>Steps to reproduce
Create a React Native project with react-native-maps (version 1.24.3) on Android. Render a on a with a child . Set the image source to a base64 string from an API:
<Image source={{ uri: 'data:image/jpeg;base64,BASE64_STRING' }} style={{ width: 40, height: 40 }} resizeMode="contain" />
Expected result
The base64 image should render inside the custom Marker the same way a static local image or remote URL image renders. In other words, when using a valid base64 string as the image source, the Marker should display the image correctly on Android devices.
Actual result
The Marker renders correctly on the map, but the base64 image inside the Marker does not appear.
Static images (require(...)) and remote URL images render as expected.
No errors or warnings are shown in the console.
This happens on both physical Android devices and emulators.
React Native Maps Version
1.24.3
What platforms are you seeing the problem on?
Android
React Native Version
0.79.2
What version of Expo are you using?
Not using Expo
Device(s)
Physical & Emulator
Additional information
No response
Source: react-native-maps/react-native-maps