react-native-image-progress icon indicating copy to clipboard operation
react-native-image-progress copied to clipboard

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

Open alexaung opened this issue 6 years ago • 1 comments

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} />;

alexaung avatar Nov 26 '18 09:11 alexaung

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 });
});

dinindu-d avatar Jan 23 '19 10:01 dinindu-d