Skip to content

[1/5] perf: ship feature posters as webp instead of jpeg - #1105

Merged
AvdLee merged 4 commits into
AvdLee:masterfrom
ralph-cmyk:perf/webp-feature-posters
Jul 27, 2026
Merged

[1/5] perf: ship feature posters as webp instead of jpeg#1105
AvdLee merged 4 commits into
AvdLee:masterfrom
ralph-cmyk:perf/webp-feature-posters

Conversation

@ralph-cmyk

@ralph-cmyk ralph-cmyk commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Merge order 1 of 5 — base of the stack; #1106, #1107, #1108, and #1110 all build on this branch.

Problem. The homepage ships 864 KB of JPEG poster images. Twelve load
immediately, because every feature video shows a poster while the video itself
stays deferred.

Why it matters. That is roughly 59% of the homepage's total weight, on the
one marketing page that has to make the first impression. The docs pages score
100 on mobile performance; the homepage scores 72.5.

What changed. reencode-all.sh now exports WebP posters instead of JPEG;
posters regenerated; the poster-path convention in Feature.astro and four
hardcoded references updated. Videos are untouched and still preload="none".

KPI — starting point. Poster payload 864 KB (13 files, du -ch).
Homepage total 1.46 MB, mobile lab Performance 72.5, mobile lab LCP 5.84 s
(PageSpeed medians of 2 runs, 23 Jul 2026). Field LCP p75 1.44 s — already good,
and must stay that way.

KPI — expectation. Converted-poster payload down ~51% to ~420 KB (measured
on 5 sample conversions at q78; the directory keeps one pre-existing 105 KB
webp). Homepage total ~1.02 MB. Mobile lab LCP and Performance should improve;
field LCP p75 must not regress.

How to measure it. du -ch dist/features/posters/* for payload. Re-run
PageSpeed Insights on https://www.rocketsim.app/ (mobile, median of 2 runs)
one week after deploy and compare against 72.5 / 5.84 s / 1.46 MB.

Risk / rollback. WebP is supported by every browser RocketSim targets, and
one poster on the site is already WebP. If a poster renders wrong, revert the
commit — posters are generated artifacts, nothing else depends on them.

Posters load eagerly on the homepage while the videos stay deferred, so
they dominated page weight at 864KB. Re-encoding at webp q78 halves that
with no visible quality change.
@ralph-cmyk ralph-cmyk changed the title perf: ship feature posters as webp instead of jpeg [1/5] perf: ship feature posters as webp instead of jpeg Jul 25, 2026
@AvdLee
AvdLee marked this pull request as ready for review July 27, 2026 12:34
The video fades in from black, so the script's first-frame export
produced a black poster. This one is hand-picked from 12s (the App
Store Connect upload view), encoded with the same cwebp -q 78 pipeline
at native 1440x810. Note: re-running reencode-all.sh would overwrite
this with the black frame again.
@AvdLee

AvdLee commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Replaced the black asc-drag-drop-demo.webp poster: the video fades in from black, so the script's first-frame export was a black image (the old .jpg had the same issue, it was just never noticed). The new poster is hand-picked from 12s (the App Store Connect upload view), same cwebp -q 78 pipeline, native 1440x810, 32 KB. Heads up: re-running reencode-all.sh will overwrite it with the black frame again — worth teaching the script a per-video frame offset or a skip-existing flag at some point.

@AvdLee
AvdLee enabled auto-merge July 27, 2026 12:49
@AvdLee
AvdLee disabled auto-merge July 27, 2026 12:51
@AvdLee
AvdLee merged commit 974b875 into AvdLee:master Jul 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants