GithubHelp home page GithubHelp logo

chitezh / react-native-svg-image Goto Github PK

View Code? Open in Web Editor NEW
53.0 53.0 9.0 2.19 MB

Load SVG images from network; Does not work with local svgs

License: MIT License

JavaScript 100.00%
react-native svg svg-images

react-native-svg-image's People

Contributors

brentvatne avatar chitezh avatar mlix8hoblc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-native-svg-image's Issues

Property 'startInLoadingState'

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.

Unable to show local svg image

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:

svg_output

Thanks in advance! ๐Ÿ˜„

Margin on SVG

image
There is a margin around the image. Already tried setting padding and margin to 0 but no success. Can you bring more insight to this issue?

version: 1.1.3
react-native-svg version: 5.1.8

eliminate extra margin

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>

Error: The file name must end with .xml or .png

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?

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?

require is not working

Hi I have this code:
<SVGImage source={require('../../assets/img/brand.svg')} /> .
But I'm getting an error:
image
Any ideas?

Unidentified line under SVG image

After updating my application to react native version 0.55.4, I am seeing this unique black line under the SVG image only on iPhone X and the new iPhone XR, XS and XS Max.
screenshot 2018-10-08 at 11 49 43 am

Updated my EXPO and not working

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

show to small in huawei 4c

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.