Some Image url working and some image url is not working in android react-native

Viewed 182

I am trying to load image with react-native Image component but for me in Android some url are working fine and some are not working(not rendering the image) but in IOS and expo these url are working fine and I have tried it with different android project but facing same issue.

Here Is my code below.

import React from "react";
import { SafeAreaView, StyleSheet, Image } from "react-native";

const App = () => {
  return (
    <SafeAreaView style={styles.container}>
      <Image
        source={{
          uri: "https://www.w3schools.com/howto/img_avatar.png"
        }}
        style={{ height: 200, width: 200 }}
      />
      <Image
        source={{
          uri:
            "https://images.pexels.com/photos/302743/pexels-photo-302743.jpeg"
        }}
        style={{ height: 200, width: 200 }}
      />
    </SafeAreaView>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: "center",
    alignItems: "center"
  }
});

export default App;

In the above code first url is working fine but second one is not rendering the image.

Screenshot of android emulator

0 Answers
Related