tachyon icon indicating copy to clipboard operation
tachyon copied to clipboard

Add watermark support

Open roborourke opened this issue 7 years ago • 5 comments

This is something sharp can do pretty easily.

Suggested API:

?wm=/path/to/image.png,southeast

Whereby the S3 path is the first arg and after the comma is the position which could default to bottom right.

roborourke avatar Dec 12 '18 11:12 roborourke

Probably best if a default wm could be on config, so wm=default or wm=true would use that. I suspect that most use cases would apply the same watermark. That could be loaded on a buffer upon container initialization and reused.

alsguimaraes avatar May 06 '20 21:05 alsguimaraes

That's a good idea, thanks. There's a use-case where you might want to generate or create different branded versions of an image on the fly for different situations on a website such as a hero image vs a post thumbnail for instance.

roborourke avatar Jul 17 '20 10:07 roborourke

Hmm the challenge I see is how to provide any way to require the watermark. If it's just watermark=true, I feel like the expectation would be that you can't just remove watermark=true from the URL to get a non-watermarked image.

joehoyle avatar Oct 25 '21 07:10 joehoyle

In that instance it would probably need to be an image and some config deployed alongside Tachyon. Could also extend the lambda@edge function that detects webp support perhaps so that signed URLs get the regular image but others are watermarked?

roborourke avatar Oct 25 '21 08:10 roborourke

Just realised that's exactly what @alsguimaraes suggested too 🤦‍♂️

roborourke avatar Oct 25 '21 08:10 roborourke