[Website] Performance improvements#9899
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR focuses on website performance improvements by tightening image optimization behavior (including per-use-case profiles), reducing third-party script impact on the critical render path, and improving rendered heading hierarchy across docs/blog content.
Changes:
- Introduce centralized image-optimization config with profiles (avatars, share cards) and support per-remote width ladders + improved remote cache hashing.
- Change analytics loading to defer Cookiebot and gate GTM injection on Cookiebot consent.
- Enable experimental inline CSS in Next config, refine blog featured image
sizes, and adjust docs/blog heading levels (to render correctly after the existing “demote headings” remark plugin).
Reviewed changes
Copilot reviewed 39 out of 39 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| website-next/src/image-optimization/remote.mjs | Adds avatar profile widths and fetch URL rewriting for remote avatar images. |
| website-next/src/image-optimization/generate.mjs | Supports per-remote width ladders and includes fetch URL/ladder in remote cache hashing. |
| website-next/src/image-optimization/config.mjs | New centralized base settings + per-use-case profiles (avatars/share cards). |
| website-next/src/components/AnalyticsScripts.tsx | Defers Cookiebot and gates GTM load on consent to reduce main-thread/early network cost. |
| website-next/scripts/optimize-images.mjs | Switches to config-based settings and share-card profile. |
| website-next/next.config.ts | Enables experimental.inlineCss. |
| website-next/app/blog/[...slug]/page.tsx | Refines sizes for featured images to reduce over-downloading. |
| website-next/content/docs/strawberryshake/get-started/console.md | Promotes headings (pairs with heading-demotion pipeline) for better rendered hierarchy. |
| website-next/content/docs/nitro/open-telemetry/service-monitoring.md | Promotes headings for better rendered hierarchy. |
| website-next/content/docs/nitro/open-telemetry/logging.md | Promotes headings for better rendered hierarchy. |
| website-next/content/docs/nitro/nitro-services.md | Promotes headings for better rendered hierarchy. |
| website-next/content/docs/nitro/explore-the-ui/explorer.md | Promotes headings for better rendered hierarchy. |
| website-next/content/docs/nitro/apis/deployments.md | Promotes headings for better rendered hierarchy. |
| website-next/content/docs/hotchocolate/build/adapters/mcp.md | Promotes headings for better rendered hierarchy. |
| website-next/content/docs/fusion/source-schema-extensions.md | Promotes headings for better rendered hierarchy. |
| website-next/content/docs/fusion/schema-exposure-and-evolution.md | Promotes headings for better rendered hierarchy. |
| website-next/content/docs/fusion/request-limits.md | Promotes headings for better rendered hierarchy. |
| website-next/content/docs/fusion/performance-tuning.md | Promotes headings for better rendered hierarchy. |
| website-next/content/docs/fusion/migration/coming-from-apollo-federation.md | Promotes headings for better rendered hierarchy. |
| website-next/content/docs/fusion/getting-started.md | Promotes headings for better rendered hierarchy. |
| website-next/content/docs/fusion/field-ownership-and-sharing.md | Promotes headings for better rendered hierarchy. |
| website-next/content/docs/fusion/entities-and-lookups.md | Promotes headings for better rendered hierarchy. |
| website-next/content/docs/fusion/data-requirements-and-mapping.md | Promotes headings for better rendered hierarchy. |
| website-next/content/docs/fusion/composition.md | Promotes headings for better rendered hierarchy. |
| website-next/content/docs/fusion/authentication-and-authorization.md | Promotes headings for better rendered hierarchy. |
| website-next/content/docs/fusion/aspire-integration.md | Promotes headings for better rendered hierarchy. |
| website-next/content/docs/fusion/adding-a-subgraph.md | Promotes headings for better rendered hierarchy. |
| website-next/content/docs/fusion/adapters/mcp.md | Promotes headings for better rendered hierarchy. |
| website-next/content/blog/2026-06-11-open-your-graphql-api-for-the-rest.md | Promotes headings for better rendered hierarchy. |
| website-next/content/blog/2026-06-06-newsletter-may-2026.md | Promotes headings for better rendered hierarchy. |
| website-next/content/blog/2026-06-05-introducing-skillz.md | Promotes headings for better rendered hierarchy. |
| website-next/content/blog/2026-05-28-mcp-hotchocolate-fusion.md | Promotes headings for better rendered hierarchy. |
| website-next/content/blog/2026-05-15-fusion-16.md | Promotes headings for better rendered hierarchy. |
| website-next/content/blog/2026-05-11-hot-chocolate-16.md | Promotes headings for better rendered hierarchy. |
| website-next/content/blog/2025-02-01-hot-chocolate-15.md | Promotes headings for better rendered hierarchy. |
| website-next/content/blog/2023-02-07-new-in-banana-cake-pop-4.md | Promotes headings for better rendered hierarchy. |
| website-next/content/blog/2023-01-08-new-in-banana-cake-pop-3.md | Promotes headings for better rendered hierarchy. |
| website-next/content/blog/2022-10-05-new-in-banana-cake-pop-2.md | Promotes headings for better rendered hierarchy. |
| website-next/content/blog/2022-09-01-new-in-banana-cake-pop-1.md | Promotes headings for better rendered hierarchy. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+75
to
+83
| // GitHub avatars accept an `s=<size>` param; request a pre-scaled image so we | ||
| // never download (or self-host) the full-size original. Other hosts are | ||
| // fetched as-is. | ||
| function avatarFetchUrl(avatar) { | ||
| if (!/^https:\/\/avatars\.githubusercontent\.com\//.test(avatar)) { | ||
| return avatar; | ||
| } | ||
| return `${avatar}${avatar.includes("?") ? "&" : "?"}s=${profiles.avatars.fetchSize}`; | ||
| } |
This was referenced Jun 16, 2026
This was referenced Jun 24, 2026
This was referenced Jun 28, 2026
This was referenced Jul 5, 2026
This was referenced Jul 13, 2026
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.
No description provided.