Bhaumik Surani
Bhaumik Surani

Reputation: 1833

React Native Defaultsource Image stretch on Android

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?

Upvotes: 2

Views: 873

Answers (2)

darkknight2008
darkknight2008

Reputation: 45

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

Upvotes: 3

Tushar Sain
Tushar Sain

Reputation: 11

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.

Upvotes: 1

Related Questions