Skip to content

fix(iOS): reuse prefetched images - #57971

Open
CHANDRAMOHANnegi wants to merge 1 commit into
react:mainfrom
CHANDRAMOHANnegi:fix/28557-image-prefetch-does-not-work-on-ios
Open

fix(iOS): reuse prefetched images#57971
CHANDRAMOHANnegi wants to merge 1 commit into
react:mainfrom
CHANDRAMOHANnegi:fix/28557-image-prefetch-does-not-work-on-ios

Conversation

@CHANDRAMOHANnegi

@CHANDRAMOHANnegi CHANDRAMOHANnegi commented Aug 16, 2026

Copy link
Copy Markdown

Summary:

Fixes #28557.

iOS image prefetch stores decoded images using their original-size cache key. Later image requests often include concrete dimensions, producing a different cache key and causing the prefetched image to be downloaded again.

This change falls back to the original-size cache entry for sized requests and reports prefetched decoded images as available in memory through Image.queryCache().

Changelog:

[IOS] [FIXED] - Reuse prefetched images for subsequent sized image requests

Test Plan:

  • git diff --check — passed.
  • Tested with RNTester on an iPhone simulator running iOS 26.5.
  • Opened Image → Image Loading Events.
  • Verified Image.prefetch() completed successfully.
  • Verified Image.queryCache() returned disk/memory.
  • Verified the prefetched image loaded and rendered at the requested dimensions without unexpected stretching, cropping, or distortion.

Screenshot:

Screenshot 2026-08-16 at 12 09 30 PM

@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 Aug 16, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Aug 16, 2026
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. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Image prefetch does not work on iOS

1 participant