[1/5] perf: ship feature posters as webp instead of jpeg - #1105
Merged
Conversation
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.
This was referenced Jul 25, 2026
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.
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
enabled auto-merge
July 27, 2026 12:49
AvdLee
disabled auto-merge
July 27, 2026 12:51
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.
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.shnow exports WebP posters instead of JPEG;posters regenerated; the poster-path convention in
Feature.astroand fourhardcoded 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-runPageSpeed 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.