feat(lagoon): WebP variants of attachment thumbnails

- attach.VariantKey: a thumbnail's copy in another format next to it
- attach/webp (separate package, so only binaries that import it link
  the encoder): Encode at quality 80 and Variant, which writes the WebP
  copy of a thumbnail once and leaves no file on a failed encode
- github.com/gen2brain/webp v0.6.4, decided in
  .planning/notes/2026-10-28-webp-gen2brain.md
- lagoon README and docs/database/attachments.md
This commit is contained in:
Jakub Zych
2026-11-04 16:52:59 +01:00
parent 1bb2ecf9cc
commit 5c0722429b
8 changed files with 401 additions and 2 deletions

1
go.mod
View File

@@ -16,6 +16,7 @@ require (
github.com/charmbracelet/x/ansi v0.11.9
github.com/disintegration/imaging v1.6.2
github.com/fsnotify/fsnotify v1.10.1
github.com/gen2brain/webp v0.6.4
github.com/go-gormigrate/gormigrate/v2 v2.1.7
github.com/go-playground/validator/v10 v10.30.4
github.com/goccy/go-yaml v1.19.2