-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Description
I created an iOS APP for university BBS (built in PHP) with React Native 0.14.
When I send request to fetch user info, I will get a record including filed avatar
, which has value like http://bbs.uestc.edu.cn/uc_server/avatar.php?uid=32044&size=middle
, and I assigned it to source
filed of <Image>
like below,
<Image
style={styles.avatar}
source={{uri: authrization.avatar}} />
Updated recently:
It seems like a PHP method (I'm not familiar with PHP), since the value of avatar
will become http://bbs.uestc.edu.cn/uc_server/data/avatar/000/03/20/44_avatar_middle.jpg
if I type the original value in the browser.
I tried to display http://bbs.uestc.edu.cn/uc_server/avatar.php?uid=32044&size=middle
in html with <img> tag
, it will get 301 code and then get the right picture with extension.
However, the avatar is not displayed sometimes with RN. See the screenshot.
Seems like RN didn't support the redirect well even in latest 0.21.
Does the <Image>
component only support static picture file which ends with jpg|png|gif
?