necolas / react-native-web

Cross-platform React UI packages
https://necolas.github.io/react-native-web
MIT License
21.46k stars 1.77k forks source link

Image isn't support aspectRatio style #2656

Open adids1221 opened 2 months ago

adids1221 commented 2 months ago

Is there an existing issue for this?

Describe the issue

React Native Image component should support aspectRatio style ( from LayoutProps ).

Expected behavior

Image should change the aspectRatio.

Steps to reproduce

Using React Native version 0.71.12

Copy the snippet code from codesnadbox run it on mobile, the Image aspectRatio will change. Run in the browser (tested on Arc and Chrome) the Image aspectRatio isn't changed.

Test case

https://codesandbox.io/p/sandbox/condescending-ramanujan-rsddnn

Additional comments

The aspectRatio prop should be supported, it appears in the LayoutStyles, link. Results from mobile, tested on iPhone 15, IOS 17.4 image