From ec8118b63704ab23a122047d4e22d0fba416afe5 Mon Sep 17 00:00:00 2001 From: harry-g Date: Tue, 11 Jul 2017 15:27:02 -0700 Subject: [PATCH] Better doc for 'data:' uri scheme & mandatory size Summary: It is quite confusing that the 'data:' uri scheme is not documented, but working. It is very useful when getting e.g. an icon from a REST call. Also, the mandatory size style for network & data images should be mentioned here, not only in the image guide. Closes https://github.com/facebook/react-native/pull/14826 Differential Revision: D5401671 Pulled By: hramos fbshipit-source-id: 8f1f28a94095eeaccae9234e059e0983ba3556b2 --- Libraries/Image/Image.ios.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Libraries/Image/Image.ios.js b/Libraries/Image/Image.ios.js index 8127f146e..e2f1b12f3 100644 --- a/Libraries/Image/Image.ios.js +++ b/Libraries/Image/Image.ios.js @@ -35,8 +35,10 @@ const ImageViewManager = NativeModules.ImageViewManager; * including network images, static resources, temporary local images, and * images from local disk, such as the camera roll. * - * This example shows both fetching and displaying an image from local - * storage as well as one from network. + * This example shows fetching and displaying an image from local storage + * as well as one from network and even from data provided in the `'data:'` uri scheme. + * + * > Note that for network and data images, you will need to manually specify the dimensions of your image! * * ```ReactNativeWebPlayer * import React, { Component } from 'react'; @@ -53,6 +55,10 @@ const ImageViewManager = NativeModules.ImageViewManager; * style={{width: 50, height: 50}} * source={{uri: 'https://facebook.github.io/react/img/logo_og.png'}} * /> + * * * ); * }