galio icon indicating copy to clipboard operation
galio copied to clipboard

Can't open local image on Card component

Open Danielgb23 opened this issue 4 years ago • 5 comments

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

Danielgb23 avatar Jun 17 '20 03:06 Danielgb23

did you find a solution ?

ozankonur avatar Sep 27 '20 15:09 ozankonur

Not really. I used other component

Danielgb23 avatar Nov 13 '20 20:11 Danielgb23

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" />

benedsmith avatar Feb 05 '21 20:02 benedsmith

Has anybody solved it? I am having the same issue on android as well.

sojharo avatar Aug 17 '21 18:08 sojharo

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!

mohalenezi avatar Nov 11 '22 23:11 mohalenezi