<Image source={require('./images/MacWallPaper.jpg')} style={styles.container}> </Image>
When you do not specify width: null and height: null , the component retrieves the actual width and height of the original image.
container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: 'rgba(0, 0, 0, 0)', }
when you explicitly specify width: null and height: null , the component will not use the actual width and height of the image.
container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: 'rgba(0, 0, 0, 0)', // remove width and height to override fixed static size width: null, height: null, }
Watch this video
Ashok r
source share