Repository navigation
Add optional image watermark transforms - #503
mariojfduarte wants to merge 2 commits into
Conversation
|
This feature seems to be very useful for use-cases in our company. @willnorris What do you think of adding this to the service? Or it's kind of overkill for basic processing? |
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>
Apply the proxy allow and deny lists to wmurl, and require an options signature on signature-only proxies so a URL-only signature cannot be rewritten to fetch another host. Let wmo0 and wms0 mean zero. Co-authored-by: Cursor <cursoragent@cursor.com>
383e2d7 to
526044c
Compare
|
@willnorris I rebased onto current main and tightened the fetch rules. The options are ignored unless
|
Summary
wmurl,wmp,wmo,wms,wmx,wmy) that overlay a remote image after resize/rotate/flipwmurlso it fits the existing/{options}/{remote_url}path shapewmurlwmo0is fully transparent andwms0draws nothingTest plan
go test ./.../800x,wmurlaHR0cHM6Ly9leGFtcGxlLmNvbS9sb2dvLnBuZw,wmpse,wmo0.5,wms0.2/https://example.com/photo.jpgwmpc,wmpnw,wmpse) and opacity/scale/padding behave as documentedwmo0leaves the image unchanged andwms0draws nothing