TVimageResizer Preview Without a Watermark

There's nothing to paint.

Usually a watermark serves as protection against theft of images from the site, the plugin for MODx EVO TVimageResizer adds a watermark on the images it works with.

But on small previews, the watermark does not look beautiful, or only spoils the preview, in order not to add watermark to the preview and to all images whose size is less than necessary, add a condition to the file. TVimageResizer.inc.php which is located here assets\plugins\tvimageresizer

So, the version of TVimageResizer 1.9.4.4 string 124.

    if($opt['width'] > 150 ){
      $thumb -> Watermarkpngthumb = !empty($opt['watermark_thumb']) ? '../'.$opt['watermark_thumb'] : '../'.$opt['watermark'];
      $thumb -> Watermarktransparency = 100;
      $thumb -> Watermarkthumbposition = $opt['watermarkPos'];
        }

Added the condition that if the width of the picture is larger than 150px, then put on it watermark


Let’s discuss your project

Tell me what you would like to build. I will reply by email.

Or message me on Telegram @ifwcom