Categories
React Native Answers

How to fix image not showing in React Native and JavaScript?

Spread the love

To fix image not showing in React Native and JavaScript, we set the source prop to the correct value.

For instance, we write

<Image
  source={{ uri: "https://picsum.photos/400/300" }}
  style={{ width: 400, height: 400 }}
/>

to add an Image component with the source prop set to { uri: "https://picsum.photos/30/30" } to display the image at the URL.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *