Automatically apply a text or image watermark to uploaded images.
- Text watermark or image (PNG logo) watermark
- 9 position presets: 4 corners, 4 edge-midpoints, center, plus tiled
- Configurable opacity (0 to 100%)
- Configurable scale (watermark size as a percentage of the image width)
- Margin from the edges
- Skip small images (min-width and min-height thresholds)
- Whitelist of file extensions (jpg/jpeg, png, webp)
- Auto-apply on upload via the
contensio/media/uploadedhook action - Manual apply via artisan command for a single file or a whole directory
- Preview in the admin settings page shows a live example with your current settings
- Contensio CMS
^2.0 - PHP 8.2+ with the GD extension (usually installed by default)
composer require contensio/plugin-watermarkEnable the plugin from the admin Plugins page.
The plugin listens to the contensio/media/uploaded action hook. Any core or plugin that fires this hook with the uploaded file path will trigger watermarking. The Contensio core fires this hook for every media upload.
# Single file
php artisan contensio-watermark:apply storage/app/public/photo.jpg
# All images in a directory (recursive)
php artisan contensio-watermark:apply storage/app/public/uploads --recursiveuse Contensio\Watermark\Support\Watermark;
Watermark::apply('/absolute/path/to/image.jpg');
// Overwrites the image in place
Watermark::apply('/absolute/path/to/image.jpg', '/absolute/path/to/output.jpg');
// Writes to a different path- The watermark is burned into the image. The original file is replaced unless you pass an output path. Keep backups before bulk-applying.
- WebP output requires PHP compiled with WebP support in GD (most modern PHP builds include it).
- PNG transparency is preserved when the image type is PNG.
AGPL-3.0-or-later. See the LICENSE file.