Skip to content

Adding borders to an image makes it take all the possible size #16284

@TPXP

Description

@TPXP

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

Environment:
OS: Linux 4.13
Node: 8.6.0
Yarn: 1.1.0
npm: 5.4.2
Watchman: Not Found
No Xcode Installed (crashed the script...)
Android Studio: 2.3.3 AI-162.4069837

Packages:
react: 16.0.0-alpha.12 => 16.0.0-alpha.12
react-native: 0.48.4 => 0.48.4

Target platform : Android (Oneplus A3003, Android 7.1.1, OxygenOS 4.5.0)

Steps to Reproduce

  1. Clone the test case
  2. Start the app, in expo or not
  3. Notice the images don't behave the same way

Expected Behavior

The images should have the same width and height, the bottom image should just have an additional black border.

Actual Behavior

The image with the border takes all the possible width, and is weirdly stretched ! If you don't see it properly, try in landscape mode !

screenshot_20171010-235102

I also tried with bundled images (loaded with require), but have the same behaviour.

Reproducible Demo

https://github.com/TPXP/react-native-image-contain-border

Many thanks in advance for your help !

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions