0

Using modx revo (2.3.3-pl).

I'd like to use phpthumbof snippet to add watermarks on the fly to the images referenced. In other words I want to simply upload images to a certain location and then have them referenced them via phpthumbof snippet to apply watermarks.

However I also want to protect the original images stored on the same server. Do I get it right that in this case I should use htaccess rewrite rule to direct image request to a phpthumb? In this case someone trying to obtain the original image would have anyway been redirected to the cached image with already applied watermark?

Is this the way one would recommend to use to reach my goal?

Thanks!

Etush
  • 3
  • 3

1 Answers1

1

phpThumb supports watermarking, check out their documentation.

Here's a quick modx specific example to apply a watermark on the bottom left of a given image:

[[+image:phpthumbof=`fltr[]=wmi|path/to/watermark_image.png|BL`]]
Ian Brindley
  • 2,197
  • 1
  • 19
  • 28
  • Thank you. What however if I want to use it from the css (i.e. background-image)? What's the correct way to redirect to the modx phpthumbof extra? – Etush May 23 '15 at 18:59
  • If you want to achieve this in a css file you'll need to let modx render your css in the form of a resource instead of using a static file. – Ian Brindley May 26 '15 at 09:48