823

Product support

Get help in the plugin support forum.

  • Added on Mar 14, 2025
  • Current version: 1.0.1
  • Platform Compatibility
    v3.x use latest
    v2.x not tested
    v1.x not tested
  • Created by

Categories

WatermarkLite is a powerful yet easy-to-use October CMS plugin that automatically adds customizable watermarks to your uploaded images. Protect your content and strengthen your brand presence without any manual image editing.

What This Plugin Does

This plugin seamlessly integrates with October CMS to apply your custom watermark to images as they are uploaded to your website. Once configured, it works automatically in the background with no additional steps required when uploading images.

Key Features

  • Automatic Watermarking: Images are watermarked instantly upon upload
  • Custom Watermark Image: Upload your own watermark (PNG with transparency recommended)
  • Flexible Positioning: Place your watermark in any corner or center of images
  • Size Control: Set maximum watermark dimensions as a percentage of the original image
  • Opacity Settings: Adjust transparency from subtle to prominent (0-100%)
  • Custom Padding: Control the distance from image edges in pixels
  • Selective Application: Enable/disable watermarking separately for:
    • Media Library uploads
    • System file uploads
    • Gallery uploads
  • Format Selection: Choose which image types receive watermarks (JPEG, PNG, WebP)

How to Use

  1. Install the Plugin: Install WatermarkLite through the October CMS marketplace
  2. Access Settings: Navigate to Settings → Watermark in your October CMS backend
  3. Upload Your Watermark: Add your watermark image (PNG with transparency is recommended)
  4. Configure Options:
    • Set the maximum size (as percentage of original image)
    • Choose the position (top-left, top-right, bottom-left, bottom-right, center)
    • Adjust opacity (0-100%)
    • Set padding from edges
    • Select which image types to watermark
  5. Enable/Disable Features: Turn watermarking on/off for specific upload types
  6. Save Settings: Your watermark will now be applied automatically to all future uploads

Caution

  • Irreversible Process: This plugin modifies original image files directly and does not store backup copies. Once watermarks are applied, they cannot be removed or reverted.
  • No Watermark Image, No Action: If you don't upload a watermark image in the settings, the plugin will not apply any watermarks to your images.
  • Selective Application: The plugin does not add watermarks to banner images, only to the specified upload types.
  • Only Local Disk provider supported

Tested on OctoberCMS build in mechanism:

  • Media,
  • Content (without banners and links),
  • Blog

Once configured, WatermarkLite works silently in the background, protecting your images without requiring any additional steps in your regular workflow.

WatermarkLite Plugin Technical Documentation

Dependencies

Required Packages

  • Intervention/Image (^2.7): PHP image manipulation library used for applying watermarks

Required PHP Extensions

  • gd: GD library for image processing
  • PHP 7.0+: Compatible with PHP 7.0 and higher

Implementation Architecture

The plugin operates using two primary mechanisms:

1. Middleware Processing

The plugin employs the CheckFileUploadMiddleware middleware which:

  • Intercepts HTTP requests related to file uploads
  • Validates watermark image uploads (maximum 500KB)
  • Specifically monitors Gallery image uploads bansed on the formGallery::onUpload handler
  • Applies watermarks to uploaded images based on user settings

2. Event-Based Processing

The plugin listens to the following system events:

  • system.file.upload: Handles standard system file uploads
  • media.file.upload: Handles Media Manager uploads

Watermark Configuration

Image Sizing

  • Maximum watermark dimensions are specified as a percentage of the original image (1-100%)
  • The watermark maintains its aspect ratio when scaled
  • Default size: 30% of the original image width/height

Positioning Options

  • Top Left
  • Top Right
  • Bottom Left
  • Bottom Right
  • Center
  • Custom padding can be specified in pixels (horizontal and vertical)

Visual Settings

  • Opacity: Configurable from 0-100% (0 = fully transparent, 100 = fully visible)
  • Supported image types can be selected (JPEG, PNG, WebP)

Selective Application

The plugin allows enabling/disabling watermarking for:

  • Media Library uploads
  • System file uploads
  • Gallery uploads

Implementation Notes

  • Watermarking is skipped if no watermark image is provided
  • PNG format with transparency is recommended for watermarks
  • Maximum upload size for watermark images is limited to ensure performance

The plugin uses the WatermarkTrait which handles the actual image manipulation, including scaling the watermark appropriately and positioning it according to user preferences.

1.0.1

First version of WatermarkLite

Mar 02, 2025