Warning: Failed prop type: Invalid props.style.resizeMode supplied to FastImage
Hello, I get this error on Android but Image is resized normal.But the warning is very annoying.
Warning: Failed prop type: Invalid props.style.resizeMode supplied to FastImage
Bad object: { "width":150, "height":100, "borderRadius":13, "margin":3, "resizeMode":'contain' }
<FastImage
{...this.props.imageProps}
style={[styles.image, this.props.imageStyle]}
source={{
uri: this.props.currentMessage.image,
priority: FastImage.priority.normal,
headers:{}
}}
resizeMode={FastImage.resizeMode.contain}
/>
Is there a fix for this? I'm also seeing the same issue.
+1
+1
+1
Any update on this?
In my case, I've figured out that I was indeed setting resizeMode as a style. I didn't need it, so I simply removed resizeMode from my icon style sheet. After this, message was gone for me. I didn't tried it as a prop, though.
Why this is closed? resizeMode is a valid style key on react native Image component.
https://facebook.github.io/react-native/docs/image#style
In my opinion, because that component has supplied 'resizeMode prop' already, you should not write resizeMode: 'contain' in css file. just delete only it in css file and describe resizeMode as a prop. i hope that help you