Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image Style (Width and Height) is not working if source is static #83

Open
alexaung opened this issue Nov 26, 2018 · 1 comment
Open

Comments

@alexaung
Copy link

alexaung commented Nov 26, 2018

Style is not working if source is static.
"react-native-image-progress": "^1.1.1",

const imgContent = photo ? <Image source={{ uri: photo }} style={styles.profile} borderRadius={25} /> : <Image source={require('./logo_small.png')} style={styles.profile} borderRadius={25} />;

@dinindu-d
Copy link

I have fix this by setting width and height to the image.

ImagePicker.showImagePicker(this.options, (response) => {
    const res = { ...response };
    res.width = 120;
    res.height = 120;
    this.setState({ profilePic: res });
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants