Summary
The watermarking pipeline always stamps the white logo, regardless of the image it's placed on. On light or white-background images the watermark is nearly invisible. We already ship both variants in src/assets/:
OSCode-Logo-White.svg
OSCode-Logo-Black.svg
…but only the white one is used. Add dark/light variant selection so the watermark stays legible on any background.
Current behaviour
src/lib/server/watermark.ts hardcodes the asset:
const WATERMARK_PATH = path.join(process.cwd(), 'src/assets/OSCode-Logo-White.svg');
Proposed approach
Acceptance criteria
- Watermark is clearly visible on both dark and light images.
- No regression in output size/quality or performance.
Related
- Complements the logo placement options issue — both touch
watermark.ts and could share a small "watermark options" config.
Summary
The watermarking pipeline always stamps the white logo, regardless of the image it's placed on. On light or white-background images the watermark is nearly invisible. We already ship both variants in
src/assets/:OSCode-Logo-White.svgOSCode-Logo-Black.svg…but only the white one is used. Add dark/light variant selection so the watermark stays legible on any background.
Current behaviour
src/lib/server/watermark.tshardcodes the asset:Proposed approach
sharp's.stats()).loadWatermark).light/dark/auto) via request param — pairs naturally with #logo-placement-options.Acceptance criteria
Related
watermark.tsand could share a small "watermark options" config.