=== Image Size Regeneration Control ===
Contributors: snehalpancholi
Tags: image sizes, thumbnails, regenerate, media, performance
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Choose which registered image sizes to generate, bulk-regenerate thumbnails for selected sizes, and delete unneeded size files from existing uploads.

== Description ==

Image Size Regeneration Control puts you in charge of which thumbnail sizes WordPress generates. Stop wasting disk space on image sizes your theme never uses, regenerate only the sizes you actually need, and clean up stale files left behind by removed theme sizes.

**Features:**

* Lists all registered image sizes (core + theme/plugin additions) with dimensions and crop status
* Enable/disable specific sizes — disabled sizes are suppressed during new uploads
* Bulk regenerate thumbnails for selected sizes across all existing images
* AJAX-based regeneration with live progress bar — no timeout issues
* Delete physical size files for selected sizes from the server (originals are never touched)
* All three operations are size-selective — you're never forced to regenerate everything
* Located at **Media → Image Sizes**
* Automatic updates from AddonLogic update server

== Installation ==

1. Upload the `image-size-regeneration` folder to `/wp-content/plugins/`
2. Activate the plugin through the **Plugins** menu
3. Go to **Media → Image Sizes**

== Frequently Asked Questions ==

= Will disabling a size delete existing files? =
No. Disabling a size only prevents new files from being generated during future uploads. Use the "Delete Files" section to remove existing files.

= Will the Delete Files tool remove my original images? =
No. Only the generated size variants (e.g., `image-300x200.jpg`) are deleted. The full-size original is never touched.

= How long does regeneration take? =
It depends on image count and server speed. The regeneration runs in AJAX batches of 10 images at a time, so it will not hit PHP time limits regardless of library size.

= Can I regenerate just the thumbnail size without touching all sizes? =
Yes. On the Regenerate Thumbnails section, check only the sizes you want. Only those sizes will be re-created.

= What happens to attachment metadata after deleting size files? =
The plugin removes the deleted size entries from each attachment's `_wp_attachment_metadata` so WordPress doesn't reference files that no longer exist.

== Changelog ==

= 1.0.0 =
* Initial release.

== Screenshots ==

1. Active image sizes table with enable/disable checkboxes.
2. Regenerate thumbnails section with size selection and live progress bar.
3. Delete files section with confirmation prompt.
