SVG Expo - source URI for svg - remote url

#1

Hello, I need to use SVG from a remote URL.
Can i use something like source={{uri: 'REMOTE URL'}} on Expo.Svg() ?

I didn’t find anything about it: https://docs.expo.io/versions/v18.0.0/sdk/svg.html

What can i do ?

#2

Hey @mauriciord!

Is there anyway you could create a snack.expo.io of this problem so I could help you triage this? Thanks.

#3

@mauriciord we bundle https://github.com/react-native-community/react-native-svg. Doesn’t look like it’s possible.

#4

I resolved this with a <WebView /> for showing when is .svg
Because all browsers support .svg

3 Likes
#5

I would still like to have svg support from a uri. It would be really nice. I created an issue with a package that let’s you do that: https://github.com/matc4/react-native-svg-uri/issues/66. It seems like a webview is one solution, but one that comes with quite a bit of overhead for something so simple.

1 Like