
外掛標籤
開發者團隊
原文外掛簡介
Niquelao Watermark is a standalone plugin (it does not require any other Niquelao plugin) that protects your images with a watermark generated on the fly, without ever touching the original files on disk.
The page itself always shows the clean, original image, so image SEO (descriptive file name, indexing) stays intact. Only when a visitor right-clicks an image and chooses “Open image in new tab” or “Save image as” — or drags the image out — do they get a copy with your logo overlaid. That watermarked copy is generated once and then served from an on-disk cache on later requests.
Features:
One-switch activation from the settings screen
Logo picker through the WordPress media library (transparent PNG recommended)
Configurable position: center, the 4 corners, or a repeating tile
Adjustable opacity and size (% of the image width) via sliders
Works with JPEG, PNG and WebP
The original file on disk is never modified
On-disk cache of already-watermarked images, regenerated automatically when any setting changes
No external dependencies: uses Imagick (preferred) or GD (fallback), available on virtually every shared host
Discreet “-hd” URL for the watermarked version, so the presentation URL stays clean for SEO and the mechanism is not obvious
How it works
Since version 1.2.0 the approach is “watermark only on save/open”, using two URLs:
PRESENTATION (what the site and Google see): the image is loaded by its
real, clean URL (e.g. .../uploads/2026/06/photo.jpg). That URL is NOT
rewritten: the original file is served without a watermark, so image SEO
(descriptive file name, indexing) stays intact.
SAVE / OPEN: a frontend script (assets/js/niquelao-wm-front.js)
intercepts the right-click and the drag, pointing to a variant with the
-hd suffix before the extension (e.g. .../photo-hd.jpg). That URL does
not exist on disk; .htaccess recognizes it, strips the -hd, and passes
the REAL file path to PHP, which returns the watermarked version
(generated once and cached). So “Save image as” and “Open image in new
tab” deliver the watermarked version, while the page stays clean and the
discreet -hd URL does not reveal the mechanism.
The script does NOT modify the src/srcset of the page’s (that
would break the WordPress lightbox): for right-click it overlays a
transparent watermarked clone, and for drag it only alters the
dataTransfer.
Honest note: this is deterrence, not absolute protection. A user with the
browser developer tools (Network tab) can still see the real, unwatermarked
image URL. The goal is to make casual downloading harder (right-click /
drag / copy link), not to make it impossible.
Requirements
WordPress 5.8 o superior
PHP 7.4 o superior
Imagick or GD enabled on the server
Apache mod_rewrite (or equivalent) for the .htaccess rewrite
