How to show SVG Image from URL in React Native

By Rashid •  January 4th, 2023 • 

SVG, expanded as Scalable Vector Graphics, is a popular choice for displaying images in applications because they can be scaled to any size without losing quality. In this blog post, let’s learn how to load and display SVG images from URLs in react native.

React native doesn’t have inbuilt support for SVG images. Hence, we should use third-party libraries such as react native svg for this purpose.

You can install react native svg library using any of the following commands.

npm install react-native-svg


yarn add react-native-svg

If you are using react native expo instead of react native CLI then use the command given below.

expo install react-native-svg

The SvgUri component from the react native svg library helps us to display an SVG image from a URL. See the code snippet given below.

import {SvgUri} from 'react-native-svg';

And you will get the following output.

react native image svg

Following is the complete code for reference.

import {StyleSheet, View} from 'react-native';
import React from 'react';
import {SvgUri} from 'react-native-svg';

const App = () => {
  return (
    <View style={styles.container}>

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: 'white',
export default App;

That’s how you display SVG image from URL in react native.


Keep Reading