Skip to content

Commit f696dcd

Browse files
charpeniMorgan Pretty
authored andcommitted
Add GIF and WebP support specification with Fresco 0.11
Summary: Motivation facebook#8455 Fixes facebook#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 facebook#8951 Differential Revision: D3647816 Pulled By: mkonicek fbshipit-source-id: e0349275045cae2922b4bb43bcb99af4c6ef1170
1 parent da7329c commit f696dcd

File tree

1 file changed

+33
-2
lines changed

1 file changed

+33
-2
lines changed

Libraries/Image/Image.ios.js

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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
*/
96127
const Image = React.createClass({
97128
propTypes: {

0 commit comments

Comments
 (0)