# Square Thumbnails - Version 2.3.3

## Release Date: May 16, 2025

### 🐛 Bug Fixes

#### Background Transparency Support
- **Added JPEG to PNG conversion for transparent backgrounds**: JPEG images are now automatically converted to PNG format when transparent background is selected, ensuring proper transparency support
- **Fixed transparency for all regeneration modes**: Both single and bulk regeneration now properly handle transparent backgrounds
- **Added support for multiple image formats**: Transparency now works with PNG, WebP, and AVIF formats

#### Processing Logic Improvements
- **Fixed WooCommerce height=0 dimensions**: Images with dimensions like 600x0 are now properly converted to square (600x600)
- **Improved bulk regeneration**: Fixed batch processing to continue through all images instead of stopping after the first batch
- **Fixed total count display**: Bulk regeneration now shows the correct total number of images instead of always displaying "5/5"

#### Single Image Regeneration Fix
- **Fixed single image regeneration**: Single images can now be regenerated from the Media Library details page
- Added force flag to bypass square dimension check during single regeneration
- Single regeneration now works consistently with bulk regeneration behavior
- **Fixed image source issue**: Plugin now always uses the original image as source, preventing recursive resizing and background color accumulation

### ✨ Improvements

#### Performance Optimizations
- **Optimized batch processing**: Improved handling of large media libraries with proper batch continuation
- **Memory optimization**: Reuses already loaded original images when processing multiple thumbnails

### 📝 Technical Details

- Fixed force parameter handling in bulk regeneration
- Corrected batch offset calculations for proper pagination
- Added automatic dimension forcing for WooCommerce sizes with height=0
- Updated file path handling for JPEG to PNG conversion
- Added force flag logic to allow regeneration of already-square images
- Extended media script loading to cover more WordPress admin contexts
- Added nonce generation and verification for security
- Improved JavaScript error handling and AJAX debugging
- Fixed source image handling to always use original instead of already-processed thumbnails
- Added proper alpha channel handling for transparent backgrounds
- Fixed filename updates in metadata when converting JPEG to PNG

### 🔧 Developer Notes

The plugin now properly handles:
- Automatic format conversion when transparency is required
- Proper batch processing continuation regardless of skip/success ratio
- WooCommerce compatibility for dimension edge cases
- Enhanced security with nonce verification
- Better debugging and error reporting
- Force regeneration for single images that are already square
- Correct source image loading to prevent recursive processing
- Transparent background support across all regeneration modes

### ✅ Issues Resolved
- Single image regeneration from Media Library details page now works correctly
- Force flag properly bypasses dimension checks for both single and bulk operations
- Fixed issue where regenerating would use already-processed image as source
- Transparent backgrounds now work correctly for both single and bulk regeneration