Skip to main content
Topic: nginx watermark on attachments? (Read 5210 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

nginx watermark on attachments?

I'm hoping for a "simple" way to watermark Elk attachment images.  Hardly being a coder, php is not in the cards.  One intriguing possibility is using nginx.  There is an nginx module capable of watermarking jpg/png/gif images. 

https://github.com/intaro/nginx-image-filter-watermark

I've compiled the module in nginx.  It works perfectly on jpg images served from a configured directory.  Cool!!  But would there be any way to use it for watermarking elk attachments?  

Re: nginx watermark on attachments?

Reply #1

For SMF there is an add-on, but I have no idea how to port it to elkarte
https://github.com/realdigger/SMF-Watermark
sorry for my bad english

 

Re: nginx watermark on attachments?

Reply #3

That module should work I think for downloaded images but may not for those that are page loaded or "saved as",  I'm just not sure on those,  I am intrigued though!

Did you try setting the directory to your attachment directory ?  Just curious as to what happened.

Re: nginx watermark on attachments?

Reply #4

It makes sense setting the location to the attachment directory would work. Since the files are stored as .elk may create a miss as the script expects a .jpg.  Any idea how to work around that? Edit the module source file to include .elk instead of .jpg and recompile? I'm grasping at straws here.  :D

Re: nginx watermark on attachments?

Reply #5

Yeah thinking about it since things are run through dlattach functions, we would need to make the changes there  ....  perhaps we could use this module to offload the work, but still need to make the change inside of elkarte itself.

Re: nginx watermark on attachments?

Reply #6

Sounds like the correct path.  The module works in as far as it will watermark avatars stored in a custom directory.  Would this require significant changes?  Or would it be easier to do it in php? 

Re: nginx watermark on attachments?

Reply #7

I think better stick with what is available for now @badmonkey. Not sure if there is anyone who wants to undertake it.