=== Thumbnail Manager === Contributors: yoohw Tags: thumbnails, regenerate, media, images, cleanup, wordpress Requires at least: 6.3 Tested up to: 6.9 Requires PHP: 7.4 Stable tag: 1.1 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Clean, control, and regenerate thumbnails with precision — remove unused sizes, prevent bloat, and rebuild what matters. == Description == Thumbnail Manager is a powerful tool to take full control over your WordPress image system. Instead of letting themes and plugins generate dozens of unnecessary thumbnails, you can now: - **Control which sizes are created** - **Remove unused thumbnails safely** - **Regenerate only what you actually need** All in one place. --- ### 🚀 What it does **1. Regenerate Thumbnails (NEW)** - Regenerate thumbnails based on your current enabled sizes - Works in batches with progress tracking (no timeout issues) - Perfect after disabling unwanted sizes - Ensures your Media Library stays consistent and optimized **2. Prune Unused Thumbnails** - Select sizes you want to **KEEP** - Automatically detect and remove all other generated thumbnails - Supports: - Registered sizes - Orphan `-WxH` files - `.webp`, `.bak`, `@2x`, `-1` variants **3. Orphan File Discovery** - Detect leftover thumbnails no longer registered - Clean legacy sizes from old themes/plugins - Optional aggressive cleanup mode **4. Disable Sizes for Future Uploads** - Prevent unnecessary thumbnails from being generated - Reduce storage usage going forward - Keeps your system lean and predictable **5. Scoped Processing** - Limit operations to specific folders (year/month) - Safer testing on large Media Libraries --- ### ❌ What it does NOT do - It **does NOT delete original full-size images** - It **does NOT modify image quality or compression** - It **does NOT replace image optimization plugins** - It does not automatically run actions without your confirmation --- ### 🎯 Who is it for? - WooCommerce stores with heavy image usage - Sites using multiple themes/page builders - Developers cleaning legacy media bloat - Anyone hitting disk limits or slow backups --- ## Features - 3-tab UI: **Regenerate**, **Prune Files**, **Thumbnail Sizes** - Batch processing with AJAX (no timeouts) - Dry-run preview before deletion - Smart orphan detection - Progress bars + live feedback - Future upload size control - Multisite compatible (run per site) --- ## Installation 1. Upload the plugin to `/wp-content/plugins/` or install via WordPress. 2. Activate the plugin. 3. Go to **Tools → Thumbnail Manager**. --- ## Usage ### Regenerate (Recommended flow) 1. Go to **Thumbnail Sizes** 2. Disable unwanted sizes 3. Click **Save changes and run regenerate** 4. Let the system rebuild only the sizes you want --- ### Prune Files 1. Select sizes to **KEEP** 2. Run **Dry-run** first 3. Review results 4. Switch to **Delete** and execute --- ### Thumbnail Sizes - Enable/disable sizes for future uploads - Does NOT affect existing images until prune/regenerate is used --- ## Frequently Asked Questions ### Will this delete my original images? No. Only generated thumbnails are affected. ### Should I back up first? Yes. Always back up before deleting files. ### What is “Orphan discovery”? It detects thumbnails on disk that are no longer registered in WordPress. ### When should I use Regenerate? After changing enabled sizes — to rebuild correct thumbnails. ### Does it unregister sizes? No. It prevents generation using filters instead. ### Is it safe for large sites? Yes. Uses batch processing and folder scoping. --- ## Screenshots 1. Regenerate tab with progress system 2. Prune Files with dry-run preview 3. Thumbnail Sizes configuration panel --- ## Technical Notes - Uses `intermediate_image_sizes_advanced` to control generation - Uses AJAX batching to avoid server timeout - Safe file targeting via pattern matching - Requires `manage_options` capability --- ## Changelog = 1.1 (Mar 19, 2026) = * ✨ Added **Regenerate Thumbnails** feature with batch processing and progress UI * ✨ Added **“Save changes and run regenerate”** workflow * ✨ Set **Regenerate tab as default entry** * ✨ Improved UX flow between Sizes → Regenerate → Prune * ✨ Added automatic trigger for regenerate after saving sizes * ✨ Improved admin JS handling for multi-tab interaction * 🔧 Refactored internal handlers for regeneration logic * 🔧 Improved performance for large media libraries = 1.0.1 (Dec 3, 2025) = * Added full translation support * Improved UI labels and formatting * Accessibility improvements = 1.0 (Oct 5, 2025) = * Initial release * Prune Files with dry-run and batch deletion * Orphan detection * Disable sizes for future uploads --- ## Upgrade Notice = 1.2 = Major update introducing Regenerate feature. Recommended workflow: Disable sizes → Regenerate → Prune. --- ## Privacy This plugin does not collect or transmit any personal data. All operations are performed locally on your server.