iSaBo
iSaBo

Reputation: 187

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.

Upvotes: 3

Views: 525

Answers (1)

Aung Myat Hein
Aung Myat Hein

Reputation: 4188

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

Here is using ImageBackground component in IOS.

Upvotes: 1

Related Questions