Skip to content

[Mobile] Eliminate low-res→high-res image flash#14277

Merged
raymondjacobson merged 1 commit intomainfrom
mobile-perf-fixes
May 9, 2026
Merged

[Mobile] Eliminate low-res→high-res image flash#14277
raymondjacobson merged 1 commit intomainfrom
mobile-perf-fixes

Conversation

@raymondjacobson
Copy link
Copy Markdown
Member

@raymondjacobson raymondjacobson commented May 8, 2026

When useImageSize had a smaller cached size (e.g. 150×150) but needed a larger one (e.g. 480×480 on a track page), it set imageUrl to the small URL then switched to the large URL once fetched. The source change caused Image.tsx to reset opacity = 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 as a separate value. TrackImage, CollectionImage, and UserImage pass it as priorityLowResSource to Artwork/Image, which renders it as a blurred backdrop while the high-res crossfades in.

Test plan

  • Navigate to a track page — artwork should crossfade from blurred low-res to full-res, no flash
  • Same on profile and playlist pages

🤖 Generated with Claude Code

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 8, 2026

⚠️ No Changeset found

Latest commit: 1272479

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@raymondjacobson raymondjacobson marked this pull request as ready for review May 8, 2026 01:39
@raymondjacobson raymondjacobson changed the title [Mobile] Fix lineup skeleton artwork size to match real tile (#14267) [Mobile] Faster cold-start splash + smaller cache blob + no image flash May 8, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🌐 Web preview ready

Preview URL: https://audius-web-preview-pr-14277.audius.workers.dev

Unique preview for this PR (deployed from this branch).
Workflow run

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>
@pull-request-size pull-request-size Bot added size/M and removed size/L labels May 8, 2026
@raymondjacobson raymondjacobson changed the title [Mobile] Faster cold-start splash + smaller cache blob + no image flash [Mobile] Eliminate low-res→high-res image flash May 8, 2026
@raymondjacobson raymondjacobson merged commit a738d6b into main May 9, 2026
15 checks passed
@raymondjacobson raymondjacobson deleted the mobile-perf-fixes branch May 9, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant