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

How to use with ".svg" file? #13

Open
aleclarson opened this issue Jul 16, 2015 · 1 comment
Open

How to use with ".svg" file? #13

aleclarson opened this issue Jul 16, 2015 · 1 comment

Comments

@aleclarson
Copy link

This is how .png files are used with React Native.

React.createElement(React.Image, { source: require("image!my-icon") })

Is there a similar way for .svg files?

Is it possible to use .svg with Images.xcassets like it's recommended for .png files?

@tnguyen42
Copy link

<Svg source={{uri: 'image!my-icon'}} /> should work, but I haven't tried yet.

I've actually tried after adding a height and a width, and all I can get is an empty square with red borders. A little help would be nice :-)

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

2 participants