[SOLVED][Drupal CKEditor] How to add a watermark to an image uploaded in a Drupal website?

| | 1 min read

Adding watermarks to uploaded images is a much sought after feature in the Drupal community by many Drupal users. There is an easy way to add a watermark to an image uploaded in a Drupal website using CKEditor. Read on to find out the method to do that.

Here is the method to add a watermark to an image uploaded via CKFinder. There is a plugin in CKFinder called watermark which needs to be configured before we can use it. Follow the steps below to configure it.

  • Add the following line to to CKFinder's config.php file in the location where the other plugins are added.
  • include_once "plugins/waterkmark/plugin.php";
  • Next add something like the following code above the earlier line
  •  $config['Plugin_Watermark'] = array(
            "source" => "your_logo.gif",
            "marginRight" => 5,
            "marginBottom" => 5,
            "quality" => 90,
            "transparency" => 80,
        );
  • The your_logo.gif is your watermark image which should be placed in CKFinderPath/plugins/watermark directory.

Hope that helps.

The easiest way to solve a Drupal issue is to hand it to the Drupal experts. We can provide a wide range of Drupal services to help you maintain and manage your Drupal websites. Get in touch with us to know more.