SVG Expo - source URI for svg - remote url

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 ?

Hey @mauriciord!

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

@mauriciord we bundle GitHub - react-native-svg/react-native-svg: SVG library for React Native, React Native Web, and plain React web projects.. Doesn’t look like it’s possible.

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

2 Likes

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: Use with expo/create-react-native-app · Issue #66 · vault-development/react-native-svg-uri · GitHub. It seems like a webview is one solution, but one that comes with quite a bit of overhead for something so simple.

1 Like

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