• Hello,

    First of all nice plugin you have there, saved my day. Unfortunately i stumbled upon some difficulties with very specific watermarking needs by a client.

    The use cases are listed below.
    We need to :
    — have different watermarks applied for each language (they have a Greek and an English version of the logo)
    — to have different sizing for different image sizes, at the moment logo seems good at bigger images but too large on smaller image sizes. The desired behavior is to have the watermark in the top left corner around 20% width with fixed max-width and min-width for larger and smaller image sizes.

    My client is kinda on a rush so i decided to contact you before i decide how to proceed. I would like to see if you have any suggestions for the problems listed above, maybe you can point me to a direction to customize the watermark sizing by code and a filter to pass the English logo?

    ps. we use wpml to handle multiple languages

    Thank you in advance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Kuba Mikita

    (@kubitomakita)

    Hi, I don’t think it will be easy to do both features ?? we are working on the PRO version which will allow for such conditional watermarks but it probably won’t be anytime soon.

    Thread Starter Evangelos Pallis

    (@vpsnak)

    Hello again,

    I managed to tweak your plugin to match my sizing needs, by adding max-width and max-height and downscale watermark bases on the image size.

    Do you think you could add a filter or a way for developers to register their own size options to fit their needs? I would like to see that in the next update in order to receive new updates and potentially the PRO version.

    File Changed: AttachmentProcessorGD.php
    function: apply_image_watermark

    Plugin Author Kuba Mikita

    (@kubitomakita)

    Hi, can you tell me some more how did you edit it?

    Thread Starter Evangelos Pallis

    (@vpsnak)

    Hey,

    I changed the calculation of new width and height for the watermark to override the provided one. Here is a gist with the code i used https://gist.github.com/vpsnak/eacee0aa9b3315c422f99242772bb9f7

    The result is that the watermark is downscaled to max_width and max_height (now defined as 25%) of the image applied to.

    Here are 2 screenshots of different ratio images with watermark applied using the above sizing
    https://prnt.sc/s0wd0r
    https://prnt.sc/s0wdbq

    My suggestion in my previous message was that you could use apply_filters before the sizing of the watermark to provide developers the ability to add custom sizing like i did above instead of changing the plugin code and having to manually update plugin for every update afterwards.

    if you need more info i will be more than happy to help.
    Thanks for your time

    Plugin Support annaszalkiewicz

    (@annaszalkiewicz)

    Hi! Thank you for this suggestion, we will consider it in the next version.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Tweak Watermark from Code (sizing and languages)’ is closed to new replies.