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

Warning: Failed prop type: Invalid props.style.resizeMode supplied to FastImage

Open Fed0t opened this issue 9 years ago • 8 comments

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

Fed0t avatar Sep 22 '17 12:09 Fed0t

Is there a fix for this? I'm also seeing the same issue.

claudiosvcc avatar Sep 29 '17 02:09 claudiosvcc

+1

jurby avatar Nov 14 '17 17:11 jurby

+1

yadirhb avatar Jul 03 '18 14:07 yadirhb

+1

codedogfish avatar Jul 14 '18 13:07 codedogfish

Any update on this?

91ranjan avatar Jul 22 '18 05:07 91ranjan

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.

claudiosvcc avatar Jul 24 '18 18:07 claudiosvcc

Why this is closed? resizeMode is a valid style key on react native Image component.

https://facebook.github.io/react-native/docs/image#style

neiker avatar Aug 30 '18 20:08 neiker

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

chendinh avatar Mar 09 '20 08:03 chendinh