galio
galio copied to clipboard
Can't open local image on Card component
I can't display an image either in the image or avatar slot of the Card component if it's local. Images from urls work fine but local ones don't.
Smartphone (please complete the following information):
- Device: moto g(6)
- Type of device:Physical
- OS: android 9
- React-Native version: 0.61.4
- Expo version: 3.21.5
did you find a solution ?
Not really. I used other component
Had this issue also, using Expo Go iOS. Web URLs work but local files simply show as blank. No exception thrown from what I can see
edit: more info
'image=' won't show (appear in Expo iOS) my locally stored image (under assets/image.jpeg) no matter how much I play with the path settings.
<Card flex borderless shadowColor={theme.COLORS.BLACK} style={styles.card} title="Jane Doe" caption="139 minutes ago" location="Los Angeles, CA" avatar="http://i.pravatar.cc/100?id=pineaple" imageBlockStyle={styles.cardNoRadius} image="../assets/image.jpeg" />
Has anybody solved it? I am having the same issue on android as well.
Same issue here and the Only way worked with me was to right click on the image file and click copy path.. paste it as the image source.. then finally its shown but i dont know if this is going to function after the deployment or not… good luck!