Prerender preloads the header logo instead of each page's hero image #233

Closed
opened 2026-09-10 04:13:36 -05:00 by null · 1 comment
Owner

Seen at a25077d (v0.9.5).

What is true now. scripts/prerender.js:68-81 picks the hero preload as the first <img loading="eager">, which is the header logo (src/components/layout/Header.jsx:66), and drops React's own preload for the real hero image. Every built page preloads /logo.png with fetchpriority="high". The comment there says the opposite.

What it costs. The largest image on every page starts loading late; Largest Contentful Paint is a ranking signal.

What to do. Select the image carrying fetchpriority="high", which is the hero. Correct the comment.

Trap. React writes the attribute as fetchPriority, camelCase. A case-sensitive match silently removes every hero preload.

Verify: no built page preloads /logo.png, and dist/services/contact-center/index.html preloads /assets/modern-call-center.webp.

Seen at a25077d (v0.9.5). **What is true now.** `scripts/prerender.js:68-81` picks the hero preload as the first `<img loading="eager">`, which is the header logo (`src/components/layout/Header.jsx:66`), and drops React's own preload for the real hero image. Every built page preloads `/logo.png` with `fetchpriority="high"`. The comment there says the opposite. **What it costs.** The largest image on every page starts loading late; Largest Contentful Paint is a ranking signal. **What to do.** Select the image carrying `fetchpriority="high"`, which is the hero. Correct the comment. **Trap.** React writes the attribute as `fetchPriority`, camelCase. A case-sensitive match silently removes every hero preload. Verify: no built page preloads `/logo.png`, and `dist/services/contact-center/index.html` preloads `/assets/modern-call-center.webp`.
null added this to the Batch 18: Guards and landmines found building Batch 17 milestone 2026-09-10 04:13:36 -05:00
null added the
P2
bug
performance
labels 2026-09-10 04:13:36 -05:00
null closed this issue 2026-09-10 04:32:39 -05:00
Author
Owner

Fixed in 28b07ab. scripts/prerender.js now keys the hero preload on the image React marked with a high fetch priority, matched case-insensitively because React writes fetchPriority camelCase in HTML. Verified against a build: / and /services/unified-communications preload /assets/hero-tech.webp, /services/contact-center and /industries/healthcare preload /assets/modern-call-center.webp, and grep finds no page preloading /logo.png. The stale comment claiming the eager image is the hero was corrected too.

Fixed in 28b07ab. scripts/prerender.js now keys the hero preload on the image React marked with a high fetch priority, matched case-insensitively because React writes fetchPriority camelCase in HTML. Verified against a build: / and /services/unified-communications preload /assets/hero-tech.webp, /services/contact-center and /industries/healthcare preload /assets/modern-call-center.webp, and grep finds no page preloading /logo.png. The stale comment claiming the eager image is the hero was corrected too.
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: null/Queue-North-Website#233
No description provided.