Search

I’ll keep this simple. I’m working with a photo collective, where protecting their work is a pretty big asset. So i wrote a watermark script in php. Right now, i have mod rewrite forwarding all images from the ‘protected’ folder through the script, but the images they have are really big sometimes, and it’s causing loading times to drag like woah.

I’m wondering if it would be possible to modify symphony in some small way to allow the images to be watermarked on upload. I’m more of a frontend guy so php can be a little elusive to me sometimes, but hopefully I can pick up on stuff.

If it’s a really complicated thing that’s fine. I can always say no, but I thought i’d ask.

Thanks in advance,

Chris

Someone’s actually been working on adding watermarking to Symphony’s JIT Image Manipulation extension, but it’s still experimental I think.

Thanks for the heads up czheng, I can’t believe I missed that! I’m already using the jcrop branch of jit.

I chatted this out with a friend of mine, and we wound up deciding the best solution was to change the watermark script to save watermarked images in a second folder, and check for these instances to halt re-watermarking (a super simple cache, basically). This way I could avoid sorting through the symphony code and/or causing instabilities. This seems pretty idiot proof too, since upload fields don’t allow for replacing images, which eliminates the need for a cache refresh.

if anyone else is interested in doing this, you can see how we worked it out over here.

Cachelite might also be able to achieve this? I’m not sure.

since upload fields don’t allow for replacing images

Actually this has been fixed in later versions of Symphony (i.e. the core File Upload field). So I wouldn’t rely on this.

I chatted this out with a friend of mine, and we wound up deciding the best solution was to change the watermark script to save watermarked images in a second folder, and check for these instances to halt re-watermarking (a super simple cache, basically)

JIT has its own caching, so there shouldn’t be the need to save the watermarked images separately.

Someone’s actually been working on adding watermarking to Symphony’s JIT Image Manipulation extension, but it’s still experimental I think.

I’m using the modified extension on a 2.1.2 site I’m developing at the moment and it’s working fine. What I want to change later is 2.2 compatibility and the “outsourcing” of the watermarking and custom mode functionality.

I've been thinking about the same thing as Chris - implement the watermarking on upload and not add the watermark upon display.

I have no skills in PHP and probably I didn't get it right, but JIT manipulates the image when preparing it for display, it doesn't save it with the manipulations, correct? So, the JIT with watermarking functionalities (as Jonas has implemented)has to create a new image every time the image is displayed and then discard the watermarked image.

I was thinking that for some cases it would be more appropriate to save the image directly with the watermark (cases when a non watermarked image is not needed)by implementing the watermarking with an upload field.

Alistair's image upload field already uses the JIT's image class. Wouldn't it be possible to use the updated class that has a watermarking function that Jonas did and add the watermark feature into Alistair's imageupload field (with something like $image->addWatermark(...);?

Thus, the image is saved directly with the watermark and this should increase speed when displaying it.

I wish I knew PHP to try it out. Anyone willing to do this? It will be a great functionality to have.

Ellie

PS. I will do my best to learn PHP and hopefully someday I'll be able to contribute to this amazing community.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details