chitezh / react-native-svg-image Goto Github PK
View Code? Open in Web Editor NEWLoad SVG images from network; Does not work with local svgs
License: MIT License
Load SVG images from network; Does not work with local svgs
License: MIT License
React 16 is out, need to fix the PropTypes issue.
If the property 'startInLoadingState' is set to true the SVGImage shows the ActivityIndicator like expected. Unfortunately it doesn't hide it and shows the image when finished loading.
Is it possible to load a local file instead of URL? If i download the dumbbell.svg (https://fluent-panda.appspot.com.storage.googleapis.com/dumbbell.svg) file from the example in the readme and tries to load it using source={{uri: require('./dumbbell.svg')}}
, I get the following error: TypeError: invalid svg
.
Loading the SVG from the URL as in the example in the readme works just fine though.
WebView require new property (originWhitelist={['*']}
) to display static html:
https://facebook.github.io/react-native/docs/0.56/webview#source
Hello,
I am trying to load a local svg image using SVGImage tag, but it shows a faint box instead of the actual image. The same image works fine if loaded from a server url.
Can you please help me out here. I need to show local images in my application. Following is the code snippet i am working on :
<View style={{ flex: 1 }}>
<SVGImage
style={{ width: 80, height: 80 }}
source={{uri:'./dumbbell.svg'}}
/>
</View>
Output:
Thanks in advance! ๐
There is an extra margin when using SVGImage
compared to using Image
.
The following patch should fix the issue.
@@ -37,6 +37,7 @@
max-height: 100%;
margin: 0 auto;
}
+ body { margin: 0; }
</style>
</head>
<body>
I get the error,
Error: The file name must end with .xml or .png
following is the code I am using,
<SVGImage style={{ width: 30, height: 30 }} source={require('../../res/images/facebook_icon.svg')} />
How to use this component to display the SVG as a background image?
when we use normal View container and Image component we can use some styling using absolute positioning to make it work as a background image inside the app but with your component how can I accomplish the same thing?
Hi, i've uploaded to EXPO SDK 18 and react-native-svg-image
to 1.1.3
, but not working now.
It shows just an empty blank frame
This plugin adds additional bottom padding to the original SVG image - probably leftovers of loader?
Hi. Thanks for nice package. but i have a problem in huawei 4c that svg images are too small . however in other devices show fine. how can i fix it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.