3

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.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
iSaBo
  • 157
  • 1
  • 2
  • 16

1 Answers1

1

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

Here is using ImageBackground component in IOS.

Aung Myat Hein
  • 4,018
  • 1
  • 36
  • 42