Image Asset Url


#1

Is there a way to load static images with uri?

According to the doc, this is the way to load static images:

<Image source={require('./my-icon.png')} />

But if you want to load remote images, you have to use the uri prop

<Image source={{uri: 'https://remote.com/my-icon.png'}} />

Is there a convenient way to load static images and remote images in the same way?


#2

Hey @howon92,

As far as I know that is not possible. Can you explain why you want/need to do this? Perhaps there’s another solution to what you want.

Cheers,

Adam


closed #3

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.