feat: integrate WebP/AVIF image optimization into build pipeline
Build and Deploy / build-and-test (push) Failing after 28s
Build and Deploy / build-image (push) Has been skipped
Build and Deploy / deploy (push) Has been skipped

- Add sharp dependency for image format conversion
- Generate WebP (quality 80) and AVIF (quality 70) variants for all raster images
- Render <picture> elements with srcset fallbacks (AVIF > WebP > original)
- SVG images remain as <img> without picture wrapper
- Update Dockerfile to install libvips for sharp, copy from public/ dir
- Add nginx cache rules for .webp and .avif files
- Add .gitignore for node_modules, public, dist
This commit is contained in:
2026-05-31 16:21:03 +00:00
parent f649fff223
commit 16cad3fe36
15 changed files with 1831 additions and 98 deletions
+5
View File
@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="Signal Ledger favicon">
<rect width="64" height="64" rx="12" fill="#161616"/>
<path d="M16 48V16h10c8.5 0 13 4 13 10.5 0 4.8-2.3 8-6.8 9.6L44 48H33.5l-10.2-11.1H25V48H16zm9-18.2h1.8c4.1 0 6.2-1.5 6.2-4.6 0-2.9-2-4.3-6.1-4.3H25v8.9z" fill="#f5f1e8"/>
<rect x="45" y="18" width="4" height="28" fill="#8b1e1e"/>
</svg>

After

Width:  |  Height:  |  Size: 405 B