React Native Show Live GIF Animated Image Inside Android iOS App

The .GIF image also known as Graphics Interchange Format Image supported multiple animations. So in this tutorial we would going to create a react native app that Show Live GIF Animated Image Inside Image component in both Android iOS Applications. But there is a hidden thing like iOS app react native iOS app directly not support the .GIF format. We need to install the facebook.fresco library in our react native project. So read the below tutorial and Happy Reading .


Note : You need to only configure your android project so read the Step :1 from below because by default react native android app dose not support GIF images. But there is no need to to configure anything in iOS application.

Contents in this project Show Live GIF Animated Image Inside React Native Android iOS App :

1. Open YourReactNativeProjectFolder -> android -> app -> build.gradle file. Now add below dependencies inside the dependencies block. This is React Native’s official libraries and you can learn more about them here on its official page under GIF and Web support on Android topic.

2. Now you need to re-run the complete project using
reactnative runandroid command. On running time you can see that all the above libraries would be downloaded in your project automatically from internet.

3. Import StyleSheet, Text, View and Image component in your project.

4. Create a Root View in render’s return block.

5. Create Image component in root view. Now we would call the GIF image from our online server using URL. If you want to Show GIF image from local resource then read my this tutorial.

6. Create Style for View component.

7. Complete source code for App.js File :

Screenshot in Android device:

Show Live GIF Animated ImageScreenshot in iOS device :