Website: underline the demo-note link, 480 px WebP variant for phones, ?v=19
Lighthouse desktop flagged the one in-text link that relied on colour alone; the hero and rail images gain a 480w candidate so a 2× phone no longer downloads the 600w file.
This commit is contained in:
1 parent
975c9f440b
commit
d8d7257d35
8 files changed
+22
-20
No files matched your search
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
# Builds the website's img/ folder from ../assets: the five screenshots as PNG (fallback)
|
||||
# plus WebP at 600 and 1170 px wide (what <picture> actually serves), and the 1200×630
|
||||
# plus WebP at 480, 600 and 1170 px wide (what <picture> actually serves), and the 1200×630
|
||||
# social card. Needs ffmpeg with libwebp. Usage: website/build-images.sh <dist>/img
|
||||
set -euo pipefail
|
||||
out=${1:?target img dir}; mkdir -p "$out"
|
||||
@@ -8,7 +8,7 @@ here=$(cd "$(dirname "$0")" && pwd)
|
||||
for n in home workout stats plan library; do
|
||||
src="$here/../assets/screenshots/$n.png"
|
||||
cp "$src" "$out/$n.png"
|
||||
for w in 600 1170; do
|
||||
for w in 480 600 1170; do
|
||||
ffmpeg -v error -y -i "$src" -vf "scale=$w:-1:flags=lanczos" -c:v libwebp -quality 82 -compression_level 6 "$out/$n-$w.webp"
|
||||
done
|
||||
done
|
||||
|
||||
Reference in new issue
Block a user