0

I have a big image that I'm using in the React Native ImageBackground component.

function Component(){
  return <ImageBackground style={{
    height: 300,
    width: '100%',
  }}/>;
}

The size is correct, but I would like to reposition the image internally as in object-position in css. What is an equivalent style selector?

sayandcode
  • 1,775
  • 1
  • 11
  • 24

1 Answers1

0

Try using resizeMode prop of Image. ImageBackground inherits app the properties of Image. Setting correct image resizeMode should resolve your issuel. Refer this : https://reactnative.dev/docs/image#resizemode

Alap Anerao
  • 2,083
  • 22
  • 27