A powerful WordPress plugin that protects your WooCommerce product images with dynamic watermarks and right-click protection.
- Apply watermarks on-the-fly without modifying original images
- Original files remain completely untouched in your media library
- Smart caching system for optimal performance
- Real-time preview of watermark placement
- See exactly how your watermark will look before saving
- Instant updates as you adjust settings
- 4 Position Options: Top-left, top-right, bottom-left, bottom-right
- Adjustable Opacity: Control transparency from 0-100%
- Scalable Size: Resize watermark from 10% to 200% of original
- PNG Support: Use transparent PNG images for professional watermarks
- Disable right-click context menu on product images
- Prevent drag-and-drop image saving
- Disable text selection on images
- Protection for WooCommerce zoom and lightbox
- Automatically cache watermarked images
- One-click cache clearing from admin panel
- Automatic cleanup of old cache files (30+ days)
- Cache invalidation when settings change
- WordPress: 5.8 or higher
- WooCommerce: 5.0 or higher
- PHP: 7.4 or higher
- PHP Extensions: GD Library
The plugin uses multiple strategies to detect WooCommerce product images:
- Post Parent Check: Verifies if attachment's parent is a product post type
- Gallery Meta Check: Searches product gallery metadata
- Context Check: Detects if request is from a product page
Image Request → Detection → Settings Check → Cache Check
↓
Apply Watermark (GD Library)
↓
Save to Cache → Display
- Cache filename:
{attachment_id}_{settings_hash}.jpg - Cache location:
wp-content/uploads/watermarked-cache/ - Cache key includes: position, opacity, scale, watermark ID
- Upload plugin to
/wp-content/plugins/woocommerce-image-protector/ - Activate via WordPress admin panel
- Navigate to WooCommerce > Image Protection
- Configure settings and save
See INSTALLATION.md for detailed installation instructions.
- Upload Watermark: Click "Select Watermark Image" and choose a PNG file
- Select Position: Choose from 4 corner positions
- Adjust Opacity: Use slider to set transparency (70% recommended)
- Set Scale: Resize watermark to fit your needs (100% default)
- Enable Features: Toggle watermark and right-click protection
- Save Settings: Click "Save Settings" button
- Clear Cache: Remove all cached watermarked images
- Preview: Use live preview to test different settings
woocommerce-image-protector/
├── woocommerce-image-protector.php # Main plugin file
├── admin/ # Admin panel components
│ ├── admin-settings.php # Settings page UI
│ ├── settings-handler.php # Settings validation & save
│ └── preview-generator.php # Live preview generator
├── includes/ # Core functionality
│ ├── image-detector.php # WooCommerce image detection
│ ├── watermark-handler.php # Watermark application (GD Library)
│ ├── cache-manager.php # Cache management system
│ └── image-filter.php # WordPress/WooCommerce hooks
├── assets/ # Frontend & admin assets
│ ├── js/
│ │ ├── image-protection.js # Right-click protection
│ │ └── admin-preview.js # Admin live preview
│ ├── css/
│ │ ├── protection.css # Frontend protection styles
│ │ └── admin-style.css # Admin panel styles
│ └── img/
│ └── preview-placeholder.jpg # Admin preview placeholder
├── readme.txt # WordPress.org readme
├── INSTALLATION.md # Installation guide
└── create-placeholder.php # Placeholder image generator
After configuration, watermarks are automatically applied to all WooCommerce product images. No additional action needed.
The plugin provides several hooks for customization:
// Modify watermark settings before application
add_filter('wip_watermark_settings', function($settings) {
$settings['opacity'] = 80;
return $settings;
});
// Add custom image detection logic
add_filter('wip_is_product_image', function($is_product, $attachment_id) {
// Your custom logic
return $is_product;
}, 10, 2);- Nonce verification on all AJAX requests
- Capability checks (
manage_woocommerce) - Input sanitization and validation
- Path traversal protection
- MIME type validation for watermark uploads
- Smart caching system minimizes server load
- Watermarks generated once and cached
- Automatic cleanup of old cache files
- Conditional asset loading (only on product pages)
- Right-click protection is not foolproof (screenshots, developer tools still work)
- Requires PHP GD Library extension
- PNG format recommended for watermarks
- Cache directory must be writable
- Verify PHP GD Library is installed
- Check if watermark image is uploaded
- Ensure "Enable Watermark" is checked
- Clear watermark cache
chmod 755 wp-content/uploads/watermarked-cache/- Clear browser cache
- Use "Clear Watermark Cache" button in admin
- Check directory permissions
Q: Does this modify my original images?
A: No! Watermarks are applied dynamically. Original files are never modified.
Q: Will this slow down my site?
A: No. The caching system ensures watermarks are only generated once per image/settings combination.
Q: Can users still save my images?
A: Right-click protection makes it harder, but determined users can still use screenshots or developer tools. No protection is 100% foolproof.
Q: What format should I use for watermarks?
A: PNG with transparency is highly recommended for best results.
For issues, questions, or feature requests:
- Check the troubleshooting section above
- Review the installation guide
- Visit the plugin support forum
GPL v2 or later
- Uses PHP GD Library for image manipulation
- Compatible with WooCommerce gallery features
- Works with PhotoSwipe lightbox
- Initial release
- Dynamic watermark application
- Live preview functionality
- 4 corner position options
- Adjustable opacity and scale
- Right-click and drag protection
- Smart caching system
- WooCommerce integration
Made with care for WooCommerce store owners who want to protect their product images.