Skip to content

Commit eba6c37

Browse files
GantManFacebook Github Bot 1
authored andcommitted
- Update remote image example
Summary: I've seen quite a few newbs trip on this, so I'm fixing it. First - you have to set the width/height on a remote image, otherwise nothing shows. This is [even on stack overflow](http://stackoverflow.com/questions/30091398/unable-to-display-image-with-react-native-with-uri). Second - with the addition of ATS in iOS most people who copy/paste this example will not be able to load an insecure image, so I changed it to the `https`. **RESULT** this doc becomes copy/paste friendly again for beginners. Closes facebook#9235 Differential Revision: D3675478 Pulled By: JoelMarcey fbshipit-source-id: 5b414caa40cda72dec4eace686278c26c251c4bb
1 parent f8f7a15 commit eba6c37

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Libraries/Image/Image.ios.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ const ImageViewManager = NativeModules.ImageViewManager;
4949
* source={require('./img/favicon.png')}
5050
* />
5151
* <Image
52-
* source={{uri: 'http://facebook.github.io/react/img/logo_og.png'}}
52+
* style={{width: 50, height: 50}}
53+
* source={{uri: 'https://facebook.github.io/react/img/logo_og.png'}}
5354
* />
5455
* </View>
5556
* );

0 commit comments

Comments
 (0)