How to Display an Animated gif in React Native

By default the Gif images are not supported in android react native app. You need to set the following code to display the gif images.

Open your android/app/build.gradle file add the following code:

open android/app/build.gradle add the following  code 

dependencies: { 
     // For animated GIF support
    compile 'com.facebook.fresco:animated-base-support:0.11.0'  
    // For WebP support, including animated WebP
    compile 'com.facebook.fresco:animated-gif:0.11.0'  
    compile 'com.facebook.fresco:animated-webp:0.11.0' 
    compile  'com.facebook.fresco:webpsupport:0.11.0'  

Then you need to bundle the app again.

References: Image component


Leave a Reply

Your email address will not be published. Required fields are marked *