React Native Defaultsource Image stretch on Android

656 Views Asked by At

Default Source image is distorted on android release app.
enter image description here

Actual placeholder image size is 100x100 that is below.
enter image description here

<Image
style={{ height: 50, width: 50, borderWidth: 2, borderColor: '#fc6060' }}
source={ { uri: "https://host/static/08_l.jpg" }}
defaultSource={require('./../../assets/image/default_avtar_placeholder.png')}
resizeMode={"contain"} />

Why image is Distorted?
How to resolve this issue?

2

There are 2 best solutions below

0
Tushar Sain On

i know its very late . Recently i also get stuck in this issue , what would i do just wrap Image Component into a View with some style like height and width and defaultSource is working fine according my requirements.

1
darkknight2008 On

I had the same problem and by deleting the border styles I got it solved.