A responsive Image element that takes the full width of its parent element while maintaining aspect ratio.
npm install react-native-fullwidth-imageA responsive Image element that takes the full width of its parent element while maintaining aspect ratio
The original idea comes from here.
```
npm install --save react-native-fullwidth-image
Start by importing the module
`js`
import FullWidthImage from 'react-native-fullwidth-image'
Now, you can use the FullWidthImage element in multiple ways as follows:
#### Initial Dimensions
You can provide an initial width and height, react-native-fullwidth-image will
infer the aspect ratio from the provided dimensions and keep it as the image is
scaled up to 100% of its parent's width
`html`
An aspect ratio of 1 will give you square images
#### Aspect Ratio
You can also provide a predefined aspect ratio (a value between 0 and 1) as follows
`html`
_An aspect ratio of 1 will give you square images_
#### Automatic detection
react-native-fullwidth-image can automatically detect the aspect ratio ofuri
remote images, all you need to provide is the as you would do with theImage
regular component.
`html`
We use react-native-fullwidth-image` in Apperture iOS / Android
MIT License. © Wassim Gharbi