Permalink
Browse files

Add GIF and WebP support specification with Fresco 0.11

Summary:
Motivation #8455
Fixes #8501

With a bonus fix typo !

![screen shot 2016-07-25 at 14 16 01](https://cloud.githubusercontent.com/assets/7189823/17112118/9f06fe04-5272-11e6-83e9-ddf11573aa5e.png)
Closes #8951

Differential Revision: D3647816

Pulled By: mkonicek

fbshipit-source-id: e0349275045cae2922b4bb43bcb99af4c6ef1170
  • Loading branch information...
1 parent 2ca2f87 commit 55bc825092dd722f18a5b5d8b4a8700ec539f336 @charpeni charpeni committed with Facebook Github Bot 1 Jul 31, 2016
Showing with 33 additions and 2 deletions.
  1. +33 −2 Libraries/Image/Image.ios.js
@@ -34,7 +34,7 @@ const ImageViewManager = NativeModules.ImageViewManager;
* including network images, static resources, temporary local images, and
* images from local disk, such as the camera roll.
*
- * This exmaples shows both fetching and displaying an image from local storage as well as on from
+ * This example shows both fetching and displaying an image from local storage as well as on from
* network.
*
* ```ReactNativeWebPlayer
@@ -73,7 +73,7 @@ const ImageViewManager = NativeModules.ImageViewManager;
* }
* });
*
- *class DisplayAnImageWithStyle extends Component {
+ * class DisplayAnImageWithStyle extends Component {
* render() {
* return (
* <View>
@@ -92,6 +92,37 @@ const ImageViewManager = NativeModules.ImageViewManager;
* () => DisplayAnImageWithStyle
* );
* ```
+ *
+ * ### GIF and WebP support on Android
+ *
+ * By default, GIF and WebP are not supported on Android.
+ *
+ * You will need to add some optional modules in `android/app/build.gradle`, depending on the needs of your app.
+ *
+ * ```
+ * dependencies {
+ * // If your app supports Android versions before Ice Cream Sandwich (API level 14)
+ * compile 'com.facebook.fresco:animated-base-support:0.11.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'
+ *
+ * // For WebP support, without animations
+ * compile 'com.facebook.fresco:webpsupport:0.11.0'
+ * }
+ * ```
+ *
+ * Also, if you use GIF with ProGuard, you will need to add this rule in `proguard-rules.pro` :
+ * ```
+ * -keep class com.facebook.imagepipeline.animated.factory.AnimatedFactoryImpl {
+ * public AnimatedFactoryImpl(com.facebook.imagepipeline.bitmaps.PlatformBitmapFactory, com.facebook.imagepipeline.core.ExecutorSupplier);
+ * }
+ * ```
+ *
*/
const Image = React.createClass({
propTypes: {

3 comments on commit 55bc825

@awendland

This documentation is applicable to older versions of RN, at least back to RN 30. Would it be possible to add it to the documentation available for those versions (instead of just the RN 32 docs)?

@charpeni
Contributor

@awendland You're right, this should be cherry-pick into older versions that was impacted by this.

I'll look at this in the next few days, thank you.

Please sign in to comment.