You can display small SVG file as data using this library,
Note: Large SVG images are not rendering properly.
npm i react-native-remote-svg
import Image from 'react-native-remote-svg'
<Image
source={{
uri: `data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"
width="100px" height="100px" viewBox="0 0 100 100">
<ellipse data-custom-shape="ellipse" cx="50" cy="50" rx="50" ry="50"
fill="green" stroke="#00FF00" stroke-width ="2" />
</svg>`
}}
style={{ width: 100, height: 100}}
/>
If you want to display any size of images remotely with above library and then do this,
<Image
source={{ uri: 'https://example.com/my-pic.svg' }}
style={{ width: 200, height: 532}}
/>
But if you used this one for display the local svg file, then you will get some issues in android when you bundle and put the release.
import Image from 'react-native-remote-svg'
<Image source={require('./image.svg')} />
or you can use Icomoon (For small SVG images/Icons),
Recommended: Use Icomoon for Icons and Small SVG Images
See this video to setup the icomoon in react native