[Mobile] Eliminate low-res→high-res image flash#14277
Merged
raymondjacobson merged 1 commit intomainfrom May 9, 2026
Merged
Conversation
|
Contributor
🌐 Web preview readyPreview URL: https://audius-web-preview-pr-14277.audius.workers.dev Unique preview for this PR (deployed from this branch). |
When useImageSize had a smaller size cached (e.g. 150×150) but needed a larger one (e.g. 480×480), it set imageUrl to the small URL then switched to the large URL once fetched. The source change caused Image.tsx to reset opacity to 0 and re-fade — a visible flash on track, profile, and playlist pages. useImageSize now sets imageUrl to the target URL optimistically and returns priorityLowResUrl separately. TrackImage, CollectionImage, and UserImage pass it as priorityLowResSource to Artwork/Image, which shows it as a blurred backdrop while the high-res crossfades in. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
6930388 to
1272479
Compare
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.

When
useImageSizehad a smaller cached size (e.g. 150×150) but needed a larger one (e.g. 480×480 on a track page), it setimageUrlto the small URL then switched to the large URL once fetched. The source change causedImage.tsxto resetopacity = 0and re-fade — a visible flash on track, profile, and playlist pages.useImageSizenow setsimageUrlto the target URL optimistically and returnspriorityLowResUrlas a separate value.TrackImage,CollectionImage, andUserImagepass it aspriorityLowResSourcetoArtwork/Image, which renders it as a blurred backdrop while the high-res crossfades in.Test plan
🤖 Generated with Claude Code