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 stackoverflow.com

One Reply to “How to Display an Animated gif in React Native”

  1. Long time reader, first time commenter — so, thought I’d drop a comment..
    — and at the same time ask for a favor.

    Your wordpress site is very simplistic – hope you don’t mind me asking what
    theme you’re using? (and don’t mind if I steal it?
    :P)

    I just launched my small businesses site –also built in wordpress like yours– but the theme slows (!) the
    site down quite a bit.

    In case you have a minute, you can find it by searching for “royal cbd” on Google (would appreciate
    any feedback)

    Keep up the good work– and take care of yourself during the coronavirus scare!

    ~Justin

Leave a Reply

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