Skip to content

feat(android): share Fresco disk cache with Image.prefetch, new example app - #213

Merged
retyui merged 5 commits into
masterfrom
chore/bump-min-rn-0.77
Oct 7, 2026
Merged

retyui merged 5 commits into
masterfrom
chore/bump-min-rn-0.77

Conversation

@retyui

@retyui retyui commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator
  • Android: cropImage reads remote images from Fresco's disk cache (filled by Image.prefetch / <Image>) and stores downloads there on miss.
  • Min React Native bumped to 0.77 (Fresco 3.4+ disk cache API).
  • New example app on RN 0.87 covering all cropImage options, with screenshots in the READMEs.

retyui added 4 commits October 7, 2026 17:51
Image.prefetch(url) and <Image> store remote images in Fresco's main disk
cache. Look up the URL there before opening a network connection so a
prefetched image is not downloaded again. Falls back to the existing
network path on cache miss or lookup failure.

iOS already reuses the cache since it loads through RCTImageLoader.
On a cache miss, cropImage now downloads the image (with the given headers)
into Fresco's main disk cache and reads it from there, so a later <Image>
with the same URL loads it from disk. Falls back to a plain download if the
cache can't be used. Also fixes the nullable BinaryResource returned by
FileCache.insert in Fresco 3.x.
Fresh RN 0.87.1 app linked to the library via link:.. with Metro watching
the repo root. New single-screen playground covering every cropImage option
(sources incl. headers, data: and file:// URIs, crop box with aspect
presets, format, quality, base64, displaySize/resizeMode) plus a cache lab
for Image.prefetch / <Image> cache reuse. Adds screenshots to the example
and root READMEs.
@retyui retyui changed the title chore: bump minimum React Native version to 0.77 feat(android): share Fresco disk cache with Image.prefetch, new example app Oct 7, 2026
@retyui
retyui merged commit 07a4eb9 into master Oct 7, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant