Skip to content
This repository was archived by the owner on Jun 16, 2026. It is now read-only.

feat(react-image): add a hook to customize ImageRequestBuilder in ReactImageView#152

Merged
SudoPlz merged 1 commit into
discord:0.81.4-discordfrom
SudoPlz:sudoplz/fresco-cache-in-rn-images-experiment
Feb 16, 2026
Merged

feat(react-image): add a hook to customize ImageRequestBuilder in ReactImageView#152
SudoPlz merged 1 commit into
discord:0.81.4-discordfrom
SudoPlz:sudoplz/fresco-cache-in-rn-images-experiment

Conversation

@SudoPlz

@SudoPlz SudoPlz commented Feb 16, 2026

Copy link
Copy Markdown

There was no extension point to tweak JS Image request builders before they get built. ReactImageView only applied its built-in cache choice logic, so app-level request policy could not be injected.

Add a new ReactImageRequestBuilderHook object with setHook and clearHook. Call the hook for both the main image request builder and the low-res cached builder right before build().

…ctImageView

There was no extension point to tweak JS Image request builders before they get built.
ReactImageView only applied its built-in cache choice logic, so app-level request policy could not be injected.

Add a new ReactImageRequestBuilderHook object with setHook and clearHook.
Call the hook for both the main image request builder and the low-res cached builder right before build().

- Needed for: https://app.asana.com/1/236888843494340/task/1213290424809812
@SudoPlz SudoPlz merged commit f7158df into discord:0.81.4-discord Feb 16, 2026
4 of 8 checks passed
@hannojg

hannojg commented Feb 18, 2026

Copy link
Copy Markdown

I think we could try upstreaming that to RN core actually!

@SudoPlz

SudoPlz commented Feb 18, 2026

Copy link
Copy Markdown
Author

I think we could try upstreaming that to RN core actually!

yes I was thinking about that, I'll do it later today!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants