Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GIF and WebP support specification with Fresco 0.11 #8951

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 33 additions & 2 deletions Libraries/Image/Image.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -73,7 +73,7 @@ const ImageViewManager = NativeModules.ImageViewManager;
* }
* });
*
*class DisplayAnImageWithStyle extends Component {
* class DisplayAnImageWithStyle extends Component {
* render() {
* return (
* <View>
Expand All @@ -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: {
Expand Down