Skip to content

v1.0.0 - Initial release

Latest

Choose a tag to compare

@chimilevschi chimilevschi released this 23 Apr 04:34

Media Watermark v1.0.0

First release of the Media Watermark plugin for Contensio.

Features

  • Text watermark or PNG logo image watermark
  • 10 position presets: 4 corners, 4 edge midpoints, center, plus tiled
  • Configurable opacity (0-100%), scale (% of image width), margin from edges
  • Skip small images via min-width and min-height thresholds
  • Whitelist of file extensions (jpg/jpeg, png, webp)
  • Auto-apply on upload via contensio/media/uploaded action hook
  • Artisan command contensio-watermark:apply {path} [--recursive] [--dry] for single files or whole directories
  • Live preview in the admin settings page showing current settings applied to a sample image
  • Pure GD implementation - no external image libraries, works with standard PHP
  • Preserves PNG transparency; configurable JPEG/WebP output quality

Storage

Tier 1 plugin - uses PluginOptions for all config, no own tables.

Requirements

  • Contensio CMS ^2.0
  • PHP 8.2+ with the gd extension (standard on most hosts)

Installation

composer require contensio/plugin-watermark

Call from code

use Contensio\Watermark\Support\Watermark;

Watermark::apply('/absolute/path/to/image.jpg');
// or specify an output path:
Watermark::apply('/absolute/path/in.jpg', '/absolute/path/out.jpg');