@@ -34,7 +34,7 @@ const ImageViewManager = NativeModules.ImageViewManager;
3434 * including network images, static resources, temporary local images, and
3535 * images from local disk, such as the camera roll.
3636 *
37- * This exmaples shows both fetching and displaying an image from local storage as well as on from
37+ * This example shows both fetching and displaying an image from local storage as well as on from
3838 * network.
3939 *
4040 * ```ReactNativeWebPlayer
@@ -73,7 +73,7 @@ const ImageViewManager = NativeModules.ImageViewManager;
7373 * }
7474 * });
7575 *
76- * class DisplayAnImageWithStyle extends Component {
76+ * class DisplayAnImageWithStyle extends Component {
7777 * render() {
7878 * return (
7979 * <View>
@@ -92,6 +92,37 @@ const ImageViewManager = NativeModules.ImageViewManager;
9292 * () => DisplayAnImageWithStyle
9393 * );
9494 * ```
95+ *
96+ * ### GIF and WebP support on Android
97+ *
98+ * By default, GIF and WebP are not supported on Android.
99+ *
100+ * You will need to add some optional modules in `android/app/build.gradle`, depending on the needs of your app.
101+ *
102+ * ```
103+ * dependencies {
104+ * // If your app supports Android versions before Ice Cream Sandwich (API level 14)
105+ * compile 'com.facebook.fresco:animated-base-support:0.11.0'
106+ *
107+ * // For animated GIF support
108+ * compile 'com.facebook.fresco:animated-gif:0.11.0'
109+ *
110+ * // For WebP support, including animated WebP
111+ * compile 'com.facebook.fresco:animated-webp:0.11.0'
112+ * compile 'com.facebook.fresco:webpsupport:0.11.0'
113+ *
114+ * // For WebP support, without animations
115+ * compile 'com.facebook.fresco:webpsupport:0.11.0'
116+ * }
117+ * ```
118+ *
119+ * Also, if you use GIF with ProGuard, you will need to add this rule in `proguard-rules.pro` :
120+ * ```
121+ * -keep class com.facebook.imagepipeline.animated.factory.AnimatedFactoryImpl {
122+ * public AnimatedFactoryImpl(com.facebook.imagepipeline.bitmaps.PlatformBitmapFactory, com.facebook.imagepipeline.core.ExecutorSupplier);
123+ * }
124+ * ```
125+ *
95126 */
96127const Image = React . createClass ( {
97128 propTypes : {
0 commit comments