Search code examples
iosreact-nativegifreact-native-iosimagebackground

React Native BackgroundImage doesn't show required GIFs - iOS


is it possible, to show animated GIFs with - source={require(...)} on iOS with React-Native?

The following example do not work:

<ImageBackground source={require(...)} style={{width:'100%',height:'100%'}} />

This Example works:

<Image source={{uri: 'https://media.giphy.com/media/JQ3IMbDi5Jkw8/giphy.gif'}} style={{width:'100%',height:'100%'}} />

I will use ImageBackground with "require" to show an animated GIF on IOS. Everything works on Android.

I hope someone can help me.


Solution

  • OfCourse, it will also work on IOS. You can test it by using https://snack.expo.io

    Here is using ImageBackground component in IOS.