Reputation: 125
I have images in my react-native application that require authentication. I have a token that I add to all of my server calls but I don't know how to set it for an Image. Can I override the loading calling for an image? Do I have to preload the image using fetch and then provide the result to the Image component?
Upvotes: 1
Views: 1468
Reputation: 22872
Yes, it is
<Image source={{ uri: 'http://...', headers: {} }} />
Upvotes: 4