software-mansion / react-native-svg

SVG library for React Native, React Native Web, and plain React web projects.
MIT License
7.37k stars 1.11k forks source link

Opening animated svg from url #1534

Closed schmru closed 4 days ago

schmru commented 3 years ago

Hello, I have been trying to open animated svg from url (sorry cant give you the url to svg since it is made for work). The svg was made by the designer and it works normal, it is animated, when opening link.

I am using "react-native-svg": "^12.1.0" and am opening svg this way:

<SvgCssUri uri={imageURL} style={imageStyle} height={height} width={width} />

Am I missing something or is this not supported?

lfrkovic-spaceiq commented 2 years ago

Did you ever get this working @schmru?

ulisesmac commented 6 months ago

@schmru I'm wondering the same as @lfrkovic-spaceiq Did you manage to solve it?

thomasread99 commented 1 month ago

@schmru @lfrkovic-spaceiq @ulisesmac did any of you manage to get this working? I have some animated SVGs on a server and but when I load them using SvgUri I just get the static image back

bohdanprog commented 1 month ago

Hello @schmru, @thomasread99, @ulisesmac @thomasread99, Are you still experiencing that issue? Kindly provide an example and steps to reproduce it. Thank you.

thomasread99 commented 1 month ago

@bohdanprog yes I am still experiencing this issue. I have the animated SVGs stored on a server, and I retrieve them to the app with the following:

 <SvgUri
    uri={`${constants.images}`}
    style={styles.image}
 />

image: {
    width: wp(20),
    height: wp(20),
    marginVertical: hp(1),
},

where constants.image is the image URI. Let me know if you need any further information.

The SVG is appearing correctly on the app, but without the animation.

bohdanprog commented 1 month ago

@thomasread99, How do you animate your SVGs? Do you have inside your SVG animate tag?

thomasread99 commented 1 month ago

@bohdanprog the actual SVG itself is animated. I got them from an open source collection, and then added them to my own server. Here is an example of one of them. I do not have it inside an animate tag 1000

bohdanprog commented 1 month ago

@thomasread99, Unfortunately, we do not currently support that particular animation. Perhaps in the future, we may consider adding that feature, but it is currently unavailable.