0

I am doing a login with Facebook in the app. where I get a user profile pic. Facebook SDK returns a profile pic URL.

profile pic

I have saved this file in directory assets/download.jfif and I get it in the RegisterScreen.js like this

<Image
 onError={() => console.log('Error')}
 onLoad={() => console.log('On Load')}
 onLoadStart={() => console.log("onLoadStart")}
 onLoadEnd={() => console.log('onLoadEnd')}
 style={{width:normalize(35), height:normalize(35)}}
 source={require('../assets/download.jfif')}
/>

but this gives me an error

`[Error: undefined Unable to resolve module `../assets/download.jfif` from src\screens\RegisterScreen.js`:`

1 Answers1

1

I'm facing the same issue, but with a remote image. It seems like RN does not support ".JFIF" images. If it's a static image You can try to convert it to another supported format. As liste here: https://reactnative.dev/docs/image#source

As of the time of writing:

The currently supported formats are png, jpg, jpeg, bmp, gif, webp, psd (iOS only). In

Tiago Nobrega
  • 505
  • 4
  • 8