PHP code example of ckfinder / ckfinder-plugin-imagewatermark-php

1. Go to this page and download the library: Download ckfinder/ckfinder-plugin-imagewatermark-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ckfinder / ckfinder-plugin-imagewatermark-php example snippets


// ...
$config['ImageWatermark'] = [
    'imagePath' => __DIR__ . '/custom/image/path/stamp.png'
];

// ...
$config['ImageWatermark'] = [
    'imagePath' => __DIR__ . '/custom/image/path/stamp.png', // Also use a custom image.
    'position' => [
        'right'  => 0,
        'bottom' => 0
    ]
];

$config['ImageWatermark'] = [               ┌────────────────┐
    'position' => [                         │                │
        'right'  => 0,                      │                │
        'bottom' => 0                       │              ▣ │
    ]                                       └────────────────┘
];

$config['ImageWatermark'] = [               ┌────────────────┐
    'position' => [                         │                │
        'right'  => 'center',               │                │
        'bottom' => 0                       │        ▣       │
    ]                                       └────────────────┘
];

$config['ImageWatermark'] = [               ┌────────────────┐
    'position' => [                         │                │
        'right'  => 0,                      │               ▣│
        'bottom' => 'center'                │                │
    ]                                       └────────────────┘
];