=== Smart Thumbnails GW ===
Contributors: maghsoudi
Tags: image, thumbnail, custom sizes, regenerate thumbnails, woocommerce
Requires at least: 5.8
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 2.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

An intelligent image management plugin that registers custom sizes for each post type and regenerates them only when needed for featured images.

== Description ==

**Are you tired of WordPress creating dozens of unused thumbnail sizes for every image you upload?**

By default, WordPress and many themes register multiple image sizes and generate them for *every single upload*, filling your server with thousands of files you will never use. This wastes disk space and makes managing your media library difficult.

**Smart Thumbnails GW solves this problem.**

This plugin stops WordPress from creating unnecessary files and gives you precise control. Its intelligent logic generates custom sizes **only for Featured Images** when a post is saved. Images uploaded into your post content won't create any extra thumbnails, saving you valuable server space.

Control exactly which sizes are created for each post type (posts, pages, products, etc.), clean up unused images automatically, and regenerate thumbnails only when you need to.

== Installation ==

1.  Upload the `smart-thumbnails-gw` folder to the `/wp-content/plugins/` directory.
2.  Activate the plugin through the 'Plugins' menu in WordPress.
3.  Go to **Settings -> Smart Thumbnails** to configure the plugin and define your custom image sizes.

== Frequently Asked Questions ==

= I defined a new size. Why aren't my old featured images showing it? =
You need to regenerate thumbnails for existing images. Go to the plugin's settings page, click on the "Regenerate Thumbnails" tab, select the post type, and start the regeneration process.

= Will this plugin create sizes for images I upload to the post content? =
No. To save server space, this plugin is designed to create custom sizes *only* for **Featured Images**. Images uploaded to the content area will not have custom sizes generated.

= Can I define sizes for images uploaded directly to the Media Library? =
Yes. In the "Image Sizes" tab, you will see a post type called "Media" (`attachment`). Any sizes you define there will be created for images uploaded directly to the Media Library.

== Changelog ==

= 2.2.0 =
* Major Architecture Overhaul (Enterprise Standard).
* Implemented Cursor-based pagination for regeneration (High Performance).
* Improved Security with strict sanitization and validation.
* Fixed PHP 8+ compatibility warnings.

= 2.1.0 =
* Refactored code to meet WordPress.org standards.
* Replaced short prefixes with a unique prefix.

= 1.0.0 =
* Initial release.