Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress on loading image from URL? #510

Closed
sejr opened this issue Nov 14, 2017 · 10 comments
Closed

Progress on loading image from URL? #510

sejr opened this issue Nov 14, 2017 · 10 comments

Comments

@sejr
Copy link

sejr commented Nov 14, 2017

I would like to use this library to load SVG resources I have already designed. Is that possible yet?

@dusave
Copy link

dusave commented Nov 14, 2017

It should be. Have you run into issues?

@sejr
Copy link
Author

sejr commented Nov 14, 2017

@dustinsavery No, I just couldn't find the API for it. What prop would I use? src?

@dusave
Copy link

dusave commented Nov 14, 2017

Sorry, I misunderstood. This library is specifically for creating SVG components, not loading in from external sources. On projects I've worked on with extensive SVG files, I run them through a build script I created to convert them into react components that use the types from this library.

@msand
Copy link
Collaborator

msand commented Nov 14, 2017

@sejr
Copy link
Author

sejr commented Nov 16, 2017

@dustinsavery Are you able to share that build script? @msand I saw this but I am using CRNA and I have not ejected from the Expo container stuff, so I can't link that library at this point.

@dusave
Copy link

dusave commented Nov 16, 2017

@sejr Possibly, I'll have to see if I can piece together the parts that do it. It's currently in an automated system

@msand
Copy link
Collaborator

msand commented Nov 16, 2017

@dustinsavery
react-native-svg-image seems to work with Expo https://snack.expo.io/@msand/test-svg-image (uses a webview)
while react-native-svg-uri seems to crash with a Device: (2:771) Requiring unknown module "react-native-svg-uri". https://snack.expo.io/@msand/test-svg-uri
@brentvatne you know why Expo doesn't work with this pure javascript module?

@msand
Copy link
Collaborator

msand commented Nov 16, 2017

@sejr I patched it a bit and got react-native-svg-uri working with Expo now as well: https://snack.expo.io/@msand/test-svg-uri-patch

@msand
Copy link
Collaborator

msand commented Feb 13, 2018

I'll go ahead and close this for now. There is also https://github.com/target/react-native-svg-parser available.

@alvaroTech911
Copy link

Is there a way to load external images? I tried using react-native-svg-uri but that only works with svgs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants