2

I use react-native-svg to insert SVG images into my React Native app. I'm currently replacing my pngs by svgs because of the blurriness of most of my assets. I came to a use case where I need to replace an ImageBackground, that uses png by an SVG file. Is there a way to do this? I tried to use the image as a main component with all my elements inside but the image appears on top of everything.

Théo Lavaux
  • 1,364
  • 3
  • 22
  • 46

1 Answers1

1

You can use react-native-svg-uri

Example

  <SvgUri
      width="200"
      height="200"
      source={{uri:'http://thenewcode.com/assets/images/thumbnails/homer-simpson.svg'}}
      source={require('./simpson.svg')}
    />
hong developer
  • 13,291
  • 4
  • 38
  • 68