=== Thumbnail Size Manager ===
Contributors: contentpowered
Author: Content Powered
Author URI: https://www.contentpowered.com/wordpress-plugins/
Plugin URI: https://www.contentpowered.com
Tags: image sizes, thumbnails, regenerate thumbnails, disk space, media library
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.2
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

See every image size your site makes, which ones are used and how much space they take, then turn off the ones you don't need and clean up their files.

== Description ==

Every image you upload to WordPress gets copied into multiple sizes behind the scenes. Core makes several, your theme adds more, and plugins like WooCommerce and page builders add even more, so one upload can become 10 or more files. Most of those sizes are never shown anywhere.

Thumbnail Size Manager shows you every image size on your site, which ones are actually used and how much disk space each one takes, then lets you switch off the ones you don't need and delete the leftover files.

= Features =

* **Size overview:** every registered size with its dimensions, crop setting, where it came from (WordPress, your theme or a specific plugin), how many files exist and the disk space they use.
* **Usage detection:** scans your posts, pages, custom fields (page-builder layouts), widgets and theme settings for the sizes and files they use, and spots sizes your theme's templates ask for.
* **Switch sizes off:** new uploads stop making them. Works for WordPress's own sizes, theme sizes and plugin sizes, including in the image editor and WooCommerce's on-the-fly resizing.
* **Big image control:** keep WordPress's 2,560px scaling, set your own limit or switch it off, and choose whether to keep the full-size original.
* **Cleanup:** deletes the files of switched-off sizes (and sizes nothing registers any more) in the background and updates each image's details. A dry run shows exactly what will be removed and how much space you'll get back first, with a CSV of every file.
* **Safety check:** files your content links to are skipped unless you confirm, and files another size or image still uses are never deleted.
* **Regenerate:** makes missing sizes for every image or the ones you choose, for example after switching themes. Also in Media > Library as a bulk action.
* **Custom sizes:** add your own sizes with dimensions, crop position and an option to show them in the editor's size picker.
* **Responsive image warning:** flags when switching sizes off would leave too few options for phones.
* **Before-and-after stats:** copies per upload, files and disk space, then and now.

Free, with no Pro version.

Find it under Content Powered > Thumbnail Size Manager in the admin menu.

Found a bug or have an idea? Use Content Powered > Report a Bug or Content Powered > Submit Feedback to send it straight to us.

= For developers =

Keep the cleanup and regenerate away from some images with the `thumbnail_size_manager_protected_attachments` filter (return an array of attachment IDs).

= Credits =

* Icons by [Lucide](https://lucide.dev), used under the ISC License. Icons derived from [Feather](https://feathericons.com) are under the MIT License. The full license text is in `icons/LICENSE`.
* Brand icons by [Simple Icons](https://simpleicons.org), CC0 1.0. Brand names and logos are trademarks of their respective owners.
* Updates delivered by [Plugin Update Checker](https://github.com/YahnisElsts/plugin-update-checker) by Janis Elsts, MIT License.

== Installation ==

1. Upload the `thumbnail-size-manager` folder to `/wp-content/plugins/`.
2. Activate the plugin through the Plugins screen in WordPress. It scans your media library and content in the background.
3. Go to Content Powered > Thumbnail Size Manager.

Updates arrive through the normal WordPress Updates screen, and you can turn on auto-updates from the Plugins screen.

== Frequently Asked Questions ==

= Will switching a size off break my site? =

No. Switching a size off only affects new uploads, and nothing is deleted until you run a cleanup. Where a theme asks for a size an image doesn't have, WordPress uses the next size up.

= Can I undo a cleanup? =

Deleted files are gone, but any size that's switched back on can be made again with Regenerate, from the original upload.

== Changelog ==

See https://github.com/jmsprsns/thumbnail-size-manager/releases for the full release history.
