Skip to content

Add optional image watermark transforms - #503

Open
mariojfduarte wants to merge 1 commit into
willnorris:mainfrom
mariojfduarte:feature/watermark
Open

Add optional image watermark transforms#503
mariojfduarte wants to merge 1 commit into
willnorris:mainfrom
mariojfduarte:feature/watermark

Conversation

@mariojfduarte

Copy link
Copy Markdown

Summary

  • Adds watermark options (wmurl, wmp, wmo, wms, wmx, wmy) that overlay a remote image after resize/rotate/flip
  • Watermark URL is URL-safe base64 in wmurl so it fits the existing /{options}/{remote_url} path shape
  • Watermark is fetched via the caching HTTP client (fail-open if fetch/decode fails); includes parse/overlay tests and README notes

Test plan

  • go test ./...
  • Run locally and request e.g. /800x,wmurl<aHR0cHM6Ly9leGFtcGxlLmNvbS9sb2dvLnBuZw>,wmpse,wmo0.5,wms0.2/https://example.com/photo.jpg
  • Confirm position variants (wmpc, wmpnw, wmpse) and opacity/scale/padding behave as documented
  • Confirm missing/unreachable watermark URL still returns the transformed base image

Made with Cursor

Allow overlaying a remote watermark image via wmurl/wmp/wmo/wms/wmx/wmy
options so proxies can brand or mark images without a separate processing step.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant