Current behaviour (RuDS):crates/bds-core/src/util/thumbnail.rs (~line 109): the image crate's WebP encoder ignores the quality parameter (comment in code: "image crate WebP encoder doesn't expose quality directly") — output is lossless/default WebP, larger files than bDS2's q80 output. JPEG quality 85 for the ai thumbnail IS applied.
Task: Encode WebP at quality 80. Rust ecosystem moves fast — check current options on the web first (per AGENTS.md): the webp crate (libwebp bindings) or image newer releases with lossy WebP support. Keep dimensions/naming/bucketing unchanged. Re-verify the thumbnail tests and add one asserting the encoder path produces lossy output (e.g. file size heuristic vs lossless, or encoder API assertion).
Acceptance: Thumbnails are lossy WebP q80; cargo test --workspace green; no CDN/external deps added beyond the encoder crate.
**Source:** Audit section 3.
**Spec:** `specs/media_processing.allium` config: thumbnail_format webp, thumbnail_quality 80 (small/medium/large), ai JPEG quality 85.
**Current behaviour (RuDS):** `crates/bds-core/src/util/thumbnail.rs` (~line 109): the `image` crate's WebP encoder ignores the quality parameter (comment in code: "image crate WebP encoder doesn't expose quality directly") — output is lossless/default WebP, larger files than bDS2's q80 output. JPEG quality 85 for the ai thumbnail IS applied.
**Task:** Encode WebP at quality 80. Rust ecosystem moves fast — check current options on the web first (per AGENTS.md): the `webp` crate (libwebp bindings) or `image` newer releases with lossy WebP support. Keep dimensions/naming/bucketing unchanged. Re-verify the thumbnail tests and add one asserting the encoder path produces lossy output (e.g. file size heuristic vs lossless, or encoder API assertion).
**Acceptance:** Thumbnails are lossy WebP q80; `cargo test --workspace` green; no CDN/external deps added beyond the encoder crate.
hugo
added the bug label 2026-07-20 19:44:02 +00:00
Implemented in bdfe57b. Replaced image 0.25's lossless-only WebP output with webp 0.3.1/libwebp encode_simple(false, quality), preserving RGBA alpha input and passing the existing production q80 value for small/medium/large thumbnails; the AI JPEG path remains q85. Dimensions, resize behavior, filenames, and bucket paths are unchanged. Added a deterministic regression asserting the generated WebP contains a lossy VP8 primary chunk instead of VP8L. The encoder dependency disables optional image integration and statically links libwebp; no CDN or runtime library was added. Verified against current primary image/webp crate docs, bDS2 Image.write quality 80 behavior, and specs/media_processing.allium. cargo machete, all thumbnail tests, cargo build --workspace, and cargo test --workspace pass; neutral review found no remaining gaps.
Implemented in bdfe57b. Replaced image 0.25's lossless-only WebP output with webp 0.3.1/libwebp encode_simple(false, quality), preserving RGBA alpha input and passing the existing production q80 value for small/medium/large thumbnails; the AI JPEG path remains q85. Dimensions, resize behavior, filenames, and bucket paths are unchanged. Added a deterministic regression asserting the generated WebP contains a lossy VP8 primary chunk instead of VP8L. The encoder dependency disables optional image integration and statically links libwebp; no CDN or runtime library was added. Verified against current primary image/webp crate docs, bDS2 Image.write quality 80 behavior, and specs/media_processing.allium. cargo machete, all thumbnail tests, cargo build --workspace, and cargo test --workspace pass; neutral review found no remaining gaps.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Source: Audit section 3.
Spec:
specs/media_processing.alliumconfig: thumbnail_format webp, thumbnail_quality 80 (small/medium/large), ai JPEG quality 85.Current behaviour (RuDS):
crates/bds-core/src/util/thumbnail.rs(~line 109): theimagecrate's WebP encoder ignores the quality parameter (comment in code: "image crate WebP encoder doesn't expose quality directly") — output is lossless/default WebP, larger files than bDS2's q80 output. JPEG quality 85 for the ai thumbnail IS applied.Task: Encode WebP at quality 80. Rust ecosystem moves fast — check current options on the web first (per AGENTS.md): the
webpcrate (libwebp bindings) orimagenewer releases with lossy WebP support. Keep dimensions/naming/bucketing unchanged. Re-verify the thumbnail tests and add one asserting the encoder path produces lossy output (e.g. file size heuristic vs lossless, or encoder API assertion).Acceptance: Thumbnails are lossy WebP q80;
cargo test --workspacegreen; no CDN/external deps added beyond the encoder crate.Implemented in
bdfe57b. Replaced image 0.25's lossless-only WebP output with webp 0.3.1/libwebp encode_simple(false, quality), preserving RGBA alpha input and passing the existing production q80 value for small/medium/large thumbnails; the AI JPEG path remains q85. Dimensions, resize behavior, filenames, and bucket paths are unchanged. Added a deterministic regression asserting the generated WebP contains a lossy VP8 primary chunk instead of VP8L. The encoder dependency disables optional image integration and statically links libwebp; no CDN or runtime library was added. Verified against current primary image/webp crate docs, bDS2 Image.write quality 80 behavior, and specs/media_processing.allium. cargo machete, all thumbnail tests, cargo build --workspace, and cargo test --workspace pass; neutral review found no remaining gaps.