Repository navigation
perf(website): size the hero poster to the box it paints in #1062
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
5d5b5b1
perf(website): size the hero poster to the box it paints in
chappie-daemon 9f0cd43
docs(website): state the hero box Hero.astro actually caps
chappie-daemon e986aa2
Merge remote-tracking branch 'origin/main' into fix/hero-poster-resol…
chappie-daemon 9fbe32b
Merge branch 'main' into fix/hero-poster-resolution
cameri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| --- | ||
| "nostream-website": patch | ||
| --- | ||
|
|
||
| perf(website): size the hero poster to the box it paints in | ||
|
|
||
| `hero-poster.webp` was encoded at 1920×1080 for a box `Hero.astro` caps at | ||
| 1180×664 CSS px (`min(1180px, 80vw, film-h * 16/9)`), which Lighthouse's | ||
| `image-delivery-insight` reported as 36.9 KiB of waste on | ||
| `ema.tnsor.network` ([#876](https://github.com/cameri/nostream/issues/876)). | ||
| The poster now encodes at 1440×810 — 1.22× that box, enough for a 1.25× | ||
| display, so it needs no `devicePixelRatio` branch — and drops from 42,926 B | ||
| to 30,878 B, a 28% reduction. SSIM against the old file at the display size | ||
| is 0.9968 at 1180×664 and 0.9964 at the larger 1359×764 layout #876 measured. | ||
|
|
||
| The social preview is unaffected: `og:image` defaults to the generated | ||
| `social-card.png` at 1200×630 in `build-social-card.mjs`, and the hero poster | ||
| has no second consumer. `scripts/build-media.mjs` resizes to 1440 so the next | ||
| `pnpm run media` keeps the size instead of restoring 1920. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.