Repository navigation
fix(macos): animated images (GIF) freeze on first frame - #3168
Merged
Saad Najmi (Saadnajmi) merged 1 commit intoNov 17, 2026
Merged
Saad Najmi (Saadnajmi) merged 1 commit into
Saad Najmi (Saadnajmi) merged 1 commit into
Conversation
Alicja Niewiadomska (alicenoknow)
requested a review
from a team
as a code owner
November 5, 2026 12:58
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Alicja Niewiadomska (alicenoknow)
force-pushed
the
fix/macos-animated-gif-display-link
branch
from
November 5, 2026 13:00
7c40486 to
bef4510
Compare
Saad Najmi (Saadnajmi)
approved these changes
Nov 17, 2026
Saad Najmi (Saadnajmi)
enabled auto-merge (squash)
November 17, 2026 06:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Fixes #3165.
On macOS, animated GIFs in
<Image>show only their first frame.RCTUIImageViewAnimatedgets its display link from+[RCTDisplayWeakRefreshable displayLinkWithWeakRefreshable:],which makes a weak proxy the link's target. On iOS that is needed because
CADisplayLinkretains its target. On macOS,RCTPlatformDisplayLinkholds its target weakly, so nothing owns the proxy. It is freed as soon as the methodreturns, and the link's ticks go to
nil.Fix: on macOS, make the view itself the link's target. The link already holds it weakly, so there is no retain
cycle. iOS is unchanged.
Testing:
RNTester (macOS, Fabric) → Image → Animated GIF. On
mainthat example is hidden by an RNTester bug that #3164 fixes.before-after.mp4