Skip to content

Default Image resizeMode to cover in C++ - #58862

Closed
bartlomiejbloniarz wants to merge 1 commit into
mainfrom
export-D123029410
Closed

bartlomiejbloniarz wants to merge 1 commit into
mainfrom
export-D123029410

Conversation

@bartlomiejbloniarz

Copy link
Copy Markdown
Contributor

Summary:
ImageProps defaulted resizeMode to stretch, while the JS Image default, the documented default and every Android image view use cover. On Android, props equal to their C++ default are not sent when a view is created, so an explicit resizeMode="stretch" never reached the view and the image rendered as cover.

The C++ default is now cover. Image always sends resizeMode on every platform, so the value components receive is unchanged, and iOS initializes its content mode from the default props.

Changelog: [General][Fixed] - Fix explicit resizeMode="stretch" being ignored on newly created Android Images

Differential Revision: D123029410

Summary:
`ImageProps` defaulted `resizeMode` to `stretch`, while the JS `Image` default, the documented default and every Android image view use `cover`. On Android, props equal to their C++ default are not sent when a view is created, so an explicit `resizeMode="stretch"` never reached the view and the image rendered as `cover`.

The C++ default is now `cover`. `Image` always sends `resizeMode` on every platform, so the value components receive is unchanged, and iOS initializes its content mode from the default props.

Changelog: [General][Fixed] - Fix explicit `resizeMode="stretch"` being ignored on newly created Android `Image`s

Differential Revision: D123029410
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 5, 2026
@facebook-github-tools facebook-github-tools Bot added p: Software Mansion Partner: Software Mansion Partner p: Facebook Partner: Facebook labels Oct 5, 2026
@meta-codesync

meta-codesync Bot commented Oct 5, 2026

Copy link
Copy Markdown

@bartlomiejbloniarz has exported this pull request. If you are a Meta employee, you can view the originating Diff in D123029410.

@bartlomiejbloniarz bartlomiejbloniarz added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner p: Software Mansion Partner: Software Mansion meta-exported labels Oct 5, 2026
@meta-codesync meta-codesync Bot closed this in e560782 Oct 6, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Oct 6, 2026
@meta-codesync

meta-codesync Bot commented Oct 6, 2026

Copy link
Copy Markdown

This pull request has been merged in e560782.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook p: Software Mansion Partner: Software Mansion Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant