humanmade/tachyon

Add watermark support

Closed this issue · 6 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.

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.

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.

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.

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?

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

I'm going to close this as wontfix until some future time when this is more required