Hi everyone,
Pretty new to RN and am working on a project that displays an animated gif on a few screens throughout the app. They have been working fine until I upgraded React-Native from 0.26.3 to 0.28.0. I also tried 0.27.0 and 0.27.2 and the issue was still present.
The animated gif image does not display. I can replace it with any other type of image and it shows just fine but if it's an animated gif (local or uri sourced) it doesn't show.
My base React package is at 15.1.0, and I'm using Android 4.4. I've tested on an emulator and a real device.
<View style={styles.inputContainer}>
<Image style={{width: 240, height: 500, alignSelf: 'center', marginVertical: 40,}}
source={require('../img/barcode.gif')}/>
</View>
Let me know if more information is needed.
You're right, i'm working on something right now.
You can refer to this issue #7760, as a workaround you can add this to your gradle file :
// For animated GIF support
compile 'com.facebook.fresco:animated-gif:0.10.0'
// For WebP support, including animated WebP
compile 'com.facebook.fresco:animated-webp:0.10.0'
compile 'com.facebook.fresco:webpsupport:0.10.0'
// For animated GIF support
compile 'com.facebook.fresco:animated-gif:0.11.0'
// For WebP support, including animated WebP
compile 'com.facebook.fresco:animated-webp:0.11.0'
compile 'com.facebook.fresco:webpsupport:0.11.0'
Thank you very much for the quick response!
After adding in the Gradle dependency you listed, my animated images now display correctly.
Most helpful comment
You're right, i'm working on something right now.
You can refer to this issue #7760, as a workaround you can add this to your gradle file :
0.27 & 0.28
0.29-rc.0