Skip to content

Commit

Permalink
- Update remote image example
Browse files Browse the repository at this point in the history
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
  • Loading branch information
GantMan authored and Facebook Github Bot 1 committed Aug 5, 2016
1 parent f8f7a15 commit eba6c37
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Libraries/Image/Image.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ const ImageViewManager = NativeModules.ImageViewManager;
* source={require('./img/favicon.png')}
* />
* <Image
* source={{uri: 'http://facebook.github.io/react/img/logo_og.png'}}
* style={{width: 50, height: 50}}
* source={{uri: 'https://facebook.github.io/react/img/logo_og.png'}}
* />
* </View>
* );
Expand Down

0 comments on commit eba6c37

Please sign in to comment.