{"id":50576527,"url":"https://github.com/trangc0de200/bulk-watermark-manager","last_synced_at":"2026-06-04T22:30:41.671Z","repository":{"id":362222500,"uuid":"1257933085","full_name":"trangc0de200/bulk-watermark-manager","owner":"trangc0de200","description":"Batch watermark images in your WordPress Media Library with a modern, intuitive interface. Select images, configure your watermark, preview the result, and apply — all without leaving WordPress admin.","archived":false,"fork":false,"pushed_at":"2026-06-03T06:21:00.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-03T08:21:52.867Z","etag":null,"topics":["plugins","plugins-wordpress","wordpress"],"latest_commit_sha":null,"homepage":"https://github.com/trangc0de200/bulk-watermark-manager","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trangc0de200.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-03T06:07:43.000Z","updated_at":"2026-06-03T06:20:38.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/trangc0de200/bulk-watermark-manager","commit_stats":null,"previous_names":["trangc0de200/bulk-watermark-manager"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/trangc0de200/bulk-watermark-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trangc0de200%2Fbulk-watermark-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trangc0de200%2Fbulk-watermark-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trangc0de200%2Fbulk-watermark-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trangc0de200%2Fbulk-watermark-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trangc0de200","download_url":"https://codeload.github.com/trangc0de200/bulk-watermark-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trangc0de200%2Fbulk-watermark-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33923173,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["plugins","plugins-wordpress","wordpress"],"created_at":"2026-06-04T22:30:40.900Z","updated_at":"2026-06-04T22:30:41.660Z","avatar_url":"https://github.com/trangc0de200.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bulk Watermark Manager\n\n\u003c!-- Markdown HTML comment used to hide line below from table of contents auto-generators: x --\u003e\n\u003c!-- prettier-ignore --\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://wordpress.org/plugins/bulk-watermark-manager/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/WordPress-5.0%2B-blue?style=for-the-badge\u0026logo=wordpress\" alt=\"WordPress\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.php.net/releases/7_4.php\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/PHP-7.4%2B-8892BF?style=for-the-badge\u0026logo=php\" alt=\"PHP\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.gnu.org/licenses/gpl-2.0.html\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-GPL%202.0-green?style=for-the-badge\" alt=\"License\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/TrangDev/bulk-watermark-manager/releases\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Version-1.0.0-orange?style=for-the-badge\" alt=\"Version\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003e Batch watermark images in your WordPress Media Library with a modern, intuitive interface. Select images, configure your watermark, preview the result, and apply — all without leaving WordPress admin.\n\n---\n\n## Screenshots\n\n| Main Interface | Watermark Configuration | Live Preview |\n|:---:|:---:|:---:|\n| ![Main Interface](https://via.placeholder.com/400x300/1a5f3c/ffffff?text=Main+Interface) | ![Configuration Panel](https://via.placeholder.com/400x300/0d395e/ffffff?text=Configuration) | ![Live Preview](https://via.placeholder.com/400x300/27ae60/ffffff?text=Live+Preview) |\n\n\u003e _Screenshots coming soon — the plugin is actively maintained._\n\n---\n\n## Table of Contents\n\n- [Features](#features)\n- [Quick Start](#quick-start)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Technical Reference](#technical-reference)\n- [Hooks \u0026 Metadata](#hooks--metadata)\n- [Security](#security)\n- [Contributing](#contributing)\n- [Changelog](#changelog)\n- [License](#license)\n\n---\n\n## Features\n\n| Feature | Description |\n|---|---|\n| **Bulk Processing** | Apply watermarks to hundreds of images simultaneously |\n| **Live Preview** | Canvas-based real-time preview updates as you adjust settings |\n| **9 Position Anchors** | Place watermarks at any corner, edge, or center |\n| **Fine-Tuned Controls** | Adjustable size (5–80%), opacity (10–100%), and edge padding (0–60px) |\n| **Original Backups** | Automatically save `_orig` copies before modifying images |\n| **Smart Filtering** | Filter by upload date or watermark status |\n| **Search** | Find images by title or filename with debounced search |\n| **Progress Tracking** | Real-time progress bar and per-image success/error log |\n| **Watermark Badges** | Visual indicator on already-watermarked images |\n| **WP Media Picker** | Select watermark images using the native WordPress picker |\n\n---\n\n## Quick Start\n\n```\n1. Install \u0026 activate the plugin\n2. Go to Media → Watermark Manager\n3. Select images from the grid\n4. Choose a watermark image\n5. Adjust position, size, opacity, and padding\n6. Preview on canvas, then click Apply\n```\n\n---\n\n## Requirements\n\n| Dependency | Minimum Version | Notes |\n|---|---|---|\n| **WordPress** | 5.0 | Tested up to the latest stable release |\n| **PHP** | 7.4 | GD extension must be enabled |\n| **PHP GD extension** | — | Used for all server-side image operations |\n| **User role** | Editor+ | Requires `upload_files` capability |\n\n### Verify GD is installed\n\n```bash\nphp -m | grep -i gd\n```\n\nExpected output contains `gd`.\n\nIf GD is missing, install it:\n\n```bash\n# Debian / Ubuntu\nsudo apt install php-gd \u0026\u0026 sudo systemctl restart php-fpm\n\n# CentOS / AlmaLinux / RHEL\nsudo dnf install php-gd \u0026\u0026 sudo systemctl restart php-fpm\n\n# macOS (Homebrew)\nbrew install php \u0026\u0026 brew services restart php\n```\n\n---\n\n## Installation\n\n### Option 1 — WordPress Admin Upload\n\n1. Download the repository as a ZIP file.\n2. Navigate to **Plugins → Add New → Upload Plugin**.\n3. Upload the ZIP and click **Install Now**.\n4. Activate the plugin.\n5. Go to **Media → Watermark Manager**.\n\n### Option 2 — FTP / File Manager\n\n1. Upload the `bulk-watermark-manager` folder to `/wp-content/plugins/`.\n2. Activate via **Plugins** in your WordPress admin.\n3. Go to **Media → Watermark Manager**.\n\n### Option 3 — WP-CLI\n\n```bash\nwp plugin install --activate /absolute/path/to/bulk-watermark-manager\n```\n\n---\n\n## Usage\n\n### Selecting Images\n\n- **Individual selection** — Click any image in the grid to toggle its selection. A green border and checkmark indicate selected items.\n- **Bulk selection** — Use **Select All** / **Deselect** in the toolbar.\n- The header counter updates in real time as you select or deselect.\n\n### Filtering \u0026 Searching\n\n| Control | Purpose |\n|---|---|\n| **Search box** | Filter by image title or filename (debounced, 350ms) |\n| **Date filter** | Show images uploaded in a specific month |\n| **Status filter** | Show only watermarked or non-watermarked images |\n\n### Configuring Watermarks\n\nClick **Set Watermark (N)** to open the configuration panel:\n\n| Setting | Range | Default | Effect |\n|---|---|---|---|\n| **Watermark Image** | Any image from Media Library | — | Source of the watermark overlay |\n| **Position** | 9 anchors (3×3 grid) | Bottom-right | Where on the image the watermark is placed |\n| **Size** | 5–80% | 25% | Watermark width as a percentage of base image |\n| **Opacity** | 10–100% | 80% | Transparency level of the watermark |\n| **Edge Padding** | 0–60px | 10px | Distance from the nearest image edge |\n| **Save Original** | On/Off | On | Stores a `_orig` copy before overwriting |\n\n### Previewing\n\nThe right-hand panel renders a live canvas preview using the first selected image. All slider changes reflect instantly — no save required to preview.\n\n### Applying\n\nClick **Apply to N images**. The progress overlay shows:\n\n- An animated progress bar\n- A running count (`N / M`)\n- A scrollable log with per-image success (`OK`) or failure (`FAIL`) entries\n\nAfter completion, the grid updates in place and the watermark badge appears on processed images.\n\n---\n\n## Technical Reference\n\n### Image Loading Flow\n\n```\nPage Load / Filter Change\n       │\n       ▼\n$.post( 'wp_ajax_bwm_load_images' )\n       │\n       ▼\nWP_Query( post_type=attachment, mime_type=image, ... )\n       │\n       ▼\nPost meta _bwm_watermarked merged into results\n       │\n       ▼\nPaginated JSON response (32 items/page)\n       │\n       ▼\nGrid renders with selection state\n```\n\n### Watermark Processing Flow\n\n```\nUser clicks \"Apply to N images\"\n       │\n       ▼\nSequential $.post() per attachment_id\n       │\n       ├──► PHP GD: imagecreatefromjpeg / png / webp\n       ├──► PHP GD: resize watermark proportionally\n       ├──► PHP GD: alpha manipulation for opacity\n       ├──► PHP GD: imagecopy onto base at position\n       ├──► PHP GD: imagejpeg / imagepng / imagewebp\n       ├──► update_post_meta( _bwm_watermarked )\n       ├──► wp_update_attachment_metadata()\n       └──► JSON response { url: \"...?v=timestamp\" }\n```\n\n### Supported Image Formats\n\n| Role | JPEG | PNG | WebP |\n|---|---|---|---|\n| **Base image** | ✅ | ✅ | ✅ |\n| **Watermark image** | ✅ | ✅ | ✅ |\n\n---\n\n## Hooks \u0026 Metadata\n\n### Post Meta\n\n| Key | Type | Description |\n|---|---|---|\n| `_bwm_watermarked` | `int` (0 or 1) | Whether the attachment has been watermarked |\n| `_bwm_wm_id` | `int` | WordPress attachment ID of the watermark image used |\n\n### AJAX Actions\n\n| Action | Callback | Auth |\n|---|---|---|\n| `bwm_load_images` | `wp_ajax_bwm_load_images` | Nonce only |\n| `bwm_apply_watermark` | `wp_ajax_bwm_apply_watermark` | Nonce + `upload_files` capability |\n\n### Nonce\n\nAll AJAX requests include `BWM.nonce`, verified server-side with `wp_verify_nonce()`. The nonce is initialized via `wp_create_nonce('bwm_nonce')` and passed to JavaScript through `wp_localize_script()`.\n\n---\n\n## Security\n\n- `ABSPATH` guard prevents direct file access.\n- All AJAX endpoints verify the WordPress nonce before processing.\n- `current_user_can('upload_files')` gates watermark application.\n- Input sanitization: `sanitize_text_field()`, `intval()`, `floatval()` on all user-supplied values.\n- MIME type and file existence validated server-side before GD operations.\n\n---\n\n## Contributing\n\nContributions are welcome. Please follow these guidelines:\n\n1. **Fork** the repository and create a feature branch (`feature/your-feature-name`).\n2. **Write clean, readable code** — follow the existing style.\n3. **Test thoroughly** on a local WordPress installation before submitting.\n4. **Commit with clear messages** — use conventional commit format.\n5. **Open a Pull Request** against `main` with a description of your changes.\n\nFor bug reports and feature requests, open an issue on GitHub.\n\n---\n\n## Changelog\n\nAll notable changes are documented below. This project follows [Keep a Changelog](https://keepachangelog.com/) conventions.\n\n### [1.0.0](https://github.com/TrangDev/bulk-watermark-manager/releases/tag/1.0.0) — 2024\n\n#### Added\n- Bulk watermark application to Media Library images with sequential AJAX processing.\n- Live canvas preview with real-time slider updates.\n- 9-position placement grid (top/middle/bottom × left/center/right).\n- Size, opacity, and edge padding controls.\n- Automatic original image backup with `_orig` suffix.\n- Image search, date filter, and watermark-status filter.\n- Watermark status badge on processed images.\n- Progress bar with per-image success/error log.\n- Native WordPress Media Library picker for watermark selection.\n- Support for JPEG, PNG, and WebP base and watermark images.\n- Responsive admin UI with loading skeleton and smooth transitions.\n\n---\n\n## License\n\n[GPL-2.0](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) © Trang Dev\n\n---\n\n\u003cp align=\"center\"\u003e\n  Built with care for the WordPress community\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrangc0de200%2Fbulk-watermark-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrangc0de200%2Fbulk-watermark-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrangc0de200%2Fbulk-watermark-manager/lists"}