-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
SvgXml Not Displaying Image but Shows Fine in Browser, etc #1611
Comments
@kylanhurt could you share a code example of how you use react-native-svg? Do you use the |
I'm facing a similar issue with the following svg
|
We're using SvgXml and recently ran into an issue where most SVGs rendered fine but some SVGs rendered with pieces missing: In a browser, that SVG looks like this: It may not be related, but if it is, we resolved it by rolling back:
It'd be worth checking versions between 10 and 12. We tried 10 because it's what we were using the last time anyone remembered seeing the crest on that bottle in the app. |
I think the problem is that this file style element included in this file |
I also have this issue |
Has this been solved or something? Checking the svg from both images... I've found out that the one which is displaying fine has the I believe that could be the reason why it's not showing up. However, I can't change width and height on the svgs, because I'm getting them from an api call. Any clues on what we should do in this case? Hey kylanhurt, have you been abled to solve this issue? |
I was having the same issue using The fix was simply to use - import { SvgXml } from "react-native-svg";
+ import { SvgWithCss } from "react-native-svg";
- <SvgXml
+ <SvgCss
xml={this.props.card.svg}
/> Edit: I found the documentation for this: https://github.com/software-mansion/react-native-svg/blob/main/USAGE.md#css-support-1 |
I am using
react-native-svg
version 12.1.1, and while SVGs for most images work fine, there is one image that is not displaying correctly and I cannot figure out why.Here is the XML:
It displays just fine in a browser, for example at the following link:
https://raw.githubusercontent.com/telosnetwork/images/master/chain_icons/telos-logo-circle.svg
So why is this library unable to display it correctly? I can only assume it has something to do with the element, or something like that. Could you guys try to display it and see if it works for you?
Any help would be appreciated.
The text was updated successfully, but these errors were encountered: