Skip to content

perf(platform-icons): Let platform icons load lazily - #20537

Open
coolguyzone wants to merge 1 commit into
masterfrom
coolguyzone/perf/lazy-platform-icons
Open

coolguyzone wants to merge 1 commit into
masterfrom
coolguyzone/perf/lazy-platform-icons

Conversation

@coolguyzone

Copy link
Copy Markdown
Contributor

DESCRIBE YOUR PR

PlatformIcon forces loading="eager" on every icon it renders. React 19 adds a <link rel="preload" as="image"> to <head> for each non-lazy image in the server-rendered page, so the homepage currently ships about 30 icon preloads. They compete with the CSS and fonts for bandwidth while the page is first rendering.

This removes the override, so icons fall back to the next/image default of lazy loading. Icons on screen still load right away, and the rest load as they scroll into view.

  • Remove the three loading="eager" props in src/components/platformIcon.tsx

loading="eager" came in with the UI redesign in #9428, with no stated reason. Follow-up to #20278, which moved the Kapa.ai widget to on-demand loading.

To check the preview: view the homepage source, and the <head> should no longer contain the platform icon rel="preload" links. Icons should still appear without visible pop-in as you scroll.

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.
Select exactly one option. For deadlines, replace YYYY-MM-DD with the due date. You can update this information later by editing the PR description.

  • Urgent deadline (GA date, etc.): YYYY-MM-DD
  • Other deadline: YYYY-MM-DD
  • No deadline: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've supplied a deadline.

Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

🤖 Generated with Claude Code

PlatformIcon forced loading="eager" on every next/image it rendered.
React 19 emits a <link rel="preload" as="image"> in <head> for each
non-lazy image in the server-rendered shell, so the homepage shipped
about 30 icon preloads that compete with CSS and fonts for bandwidth on
the critical path. Dropping the override restores next/image's lazy
default: icons in the viewport still load right away, and the rest load
as they scroll into view.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
develop-docs Ready Ready Preview Nov 5, 2026 12:04am UTC
sentry-docs Ready Ready Preview Nov 5, 2026 12:04am UTC

Request Review

@github-actions github-actions Bot added the Priority: Normal Docs review has no urgent deadline label Nov 4, 2026
@cursor

cursor Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Getting ready to monitor this change · Rollout details

Status Service Environment
⏳ Getting ready to monitor this change

This branch was successfully deployed

2 active deployments
Preview – sentry-docs — cb8b0bfb Deployed Nov 5, 2026 by vercel[bot]
Preview – develop-docs — cb8b0bfb Deployed Nov 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Normal Docs review has no urgent deadline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant