modules/phyto_image_sec/
Direct path in the repo โ all PHP, SQL, templates, and assets
Overview
Protects your plant photography automatically. Every uploaded product image goes through a pipeline: logo watermark โ IPTC copyright metadata โ WebP copy generation โ optional text overlay. The only version ever served is the watermarked one. A batch processor applies the pipeline to your existing catalogue.
Version History
v0.1 โ First Build
Logo watermark stamped on every product image at upload. Configurable position and opacity. Right-click blocker on the front end.
v0.2 โ WebP Generation and IPTC Copyright Metadata
- IPTC metadata โ shop name and URL embedded as invisible copyright data inside every JPEG; travels with the file wherever it goes
- WebP generation โ compressed WebP copy generated alongside every JPEG (30โ40% smaller); browser always loads the watermarked WebP, not the clean original
v0.3 โ Product Name Text Overlay, Batch Processor, QuickAdd Integration (current)
- Text overlay โ plant name embedded directly onto the image in white text with dark outline; default position: bottom-left, rotated 90ยฐ (upward); admin-configurable position, font size, and toggle
- Batch processor โ walks entire product catalogue in chunks of 20, applying full pipeline without timing out
- phytoquickadd integration โ all images uploaded through Quick Add automatically pass through the pipeline
Pipeline Order
Upload โ Watermark โ IPTC Embed โ WebP Generate โ Text Overlay โ Save
Source Layout
| Path | Purpose |
|---|---|
phyto_image_sec.php | Module entry + hooks |
classes/PhytoImagePipeline.php | Orchestrates the full pipeline |
classes/PhytoWatermarker.php | GD watermark stamping |
classes/PhytoIptcWriter.php | IPTC metadata injection |
classes/PhytoWebPConverter.php | WebP generation via GD/libwebp |
classes/PhytoTextOverlay.php | Product name text overlay |
controllers/admin/AdminPhytoBatchProcessController.php | Batch processor UI |