Skip to content

Image inside an ImageBackground cut off on the right side when padding is applied to the ImageBackground style #50539

Open

Description

@qwertychouskie

Description

If you have an ImageBackground element, and you set a padding as part of the style, the Image inside the ImageBackground is affected strangely, namely, the right side is cut off, while the 3 other sides are unaffected.

Tested to affect both iOS and Android; Web is unaffected.

Steps to reproduce

  1. Have an ImageBackground with padding set in the style
  2. Image is cut off on right side

React Native Version

Tested on 0.76.7 (Expo 52)

Affected Platforms

Runtime - iOS, Runtime - Android

Output of npx @react-native-community/cli info

info Fetching system and libraries information...
System:
  OS: macOS 14.6.1
  CPU: (12) arm64 Apple M3 Pro
  Memory: 161.80 MB / 18.00 GB
  Shell:
    version: 5.2.37
    path: /opt/homebrew/bin/bash
Binaries:
  Node:
    version: 23.11.0
    path: /opt/homebrew/bin/node
  Yarn:
    version: 1.22.22
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.9.2
    path: /opt/homebrew/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.1
      - iOS 18.1
      - macOS 15.1
      - tvOS 18.1
      - visionOS 2.1
      - watchOS 11.1
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.23339.11.2421.12483815
  Xcode:
    version: 16.1/16B40
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.14
    path: /usr/bin/javac
  Ruby:
    version: 2.7.8
    path: /Users/username/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.7
    wanted: 0.76.7
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

info React Native v0.78.2 is now available (your project is running on v0.76.7).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.78.2
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.76.7&to=0.78.2
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos".

Stacktrace or Logs

N/A

Reproducer

https://snack.expo.dev/75iL4g8yAERN84HPXSeQ9

Screenshots and Videos

Android:
Image

iOS:
Image

Web:
Image

Activity

  1. react-native-bot commented on Apr 8, 2025

    @react-native-bot
    Collaborator

    Tip

    Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - 0.76.9. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

  2. react-native-bot commented on Apr 8, 2025

    @react-native-bot
    Collaborator

    Tip

    Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

  3. devanshsaini11 commented on Apr 8, 2025

    @devanshsaini11
    Collaborator

    Hi @qwertychouskie, could you please verify this on the latest React Native version 0.78.x? Also, can you confirm if this issue is occurring on both the new and old arch?
    Thanks!

  4. react-native-bot commented on May 3, 2025

    @react-native-bot
    Collaborator

    This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

  5. added
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on May 3, 2025
  6. qwertychouskie commented on May 3, 2025

    @qwertychouskie
    Author

    Hi @qwertychouskie, could you please verify this on the latest React Native version 0.78.x? Also, can you confirm if this issue is occurring on both the new and old arch? Thanks!

    As far as I can tell, the latest version of Expo (version 52) is still using RN 0.76, what is the recommended way to test 0.78?

  7. removed
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on May 4, 2025
  8. react-native-bot commented on Oct 31, 2025

    @react-native-bot
    Collaborator

    This issue is stale because it has been open for 180 days with no activity. It will be closed in 7 days unless you comment on it or remove the "Stale" label.

  9. added
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    and removed
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Oct 31, 2025
  10. react-native-bot commented on Apr 29, 2026

    @react-native-bot
    Collaborator

    This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

  11. added
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    and removed
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Apr 29, 2026
  12. react-native-bot commented on Oct 27, 2026

    @react-native-bot
    Collaborator

    This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

  13. added
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Oct 27, 2026
  14. qwertychouskie commented on Oct 27, 2026

    @qwertychouskie
    Author

    Presumably still valid, I don't have a fresh test environment set up at the moment though

  15. removed
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions