We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2396
    • 101 Posts
    Hi,

    I'm trying to add a watermark to an image using pThumb. All the other filters, including watermark text, colors etc all work but I absolutely can not get a watermark image to appear. It's a Revo 2.3.5 site hosted on Modx Cloud and GD with PNG support is enabled.

    The only thing I can think of after a LOT of trying (experimenting with paths) is that I have the path to the watermark image wrong - I'm really not sure what it should be. The code I am using is:
    <img style="border-left-width:0;border-top-width:0;border-bottom-width:0;border-right-width:0;-ms-interpolation-mode:bicubic;display:block;max-width:600px" src="http://mysite.com[[*newsletterImage1:pthumb=`w=600&h=233&zc=1&fltr[]=wmi|images/watermark.png`]]" alt="" width="600" height="233">

    The rubbish inline styles are because it's an email newsletter template that is archived to the site which also means the image src needs to be absolute.

    Can anyone offer some information on what the correct path for the watermark image needs to be?

    This question has been answered by muzzstick. See the first response.

    • discuss.answer
      • 44195
      • 293 Posts
      Is pThumb using resizer?

      If not, go into system settings, select the phpthumbof namespace and there should be a setting called 'use resizer'. Set that to yes.
      Syntax Documentation: https://github.com/oo12/Resizer

      I remember this fixing a lot of cropping issues for me so maybe it will do the same with watermarks..
        I'm lead developer at Digital Penguin Creative Studio in Hong Kong. https://www.digitalpenguin.hk
        Check out the MODX tutorial series on my blog at https://www.hkwebdeveloper.com
        • 2396
        • 101 Posts
        You, sir (or madam) muzzstick, are absolutely right. It's working now.

        I wasn't using Resizer but installed it (I may have already had it installed but disabled - can't remember) and set the system setting to Yes, and it just worked.

        I had an issue with this same problem a year or so ago and abandoned what I was trying to do. It's great to know this can be solved now : ) Thankyou so much!