Wopisanje
Square Thumbnails creates perfect square thumbnails from your images without cropping them. Instead of cutting off parts of your images, it intelligently fits the entire image within a square frame, similar to how CSS background-size: contain works.
I’ve successfully implemented the two requested features for Square Thumbnails version 2.3.0:
- JPEG Quality Control
- Added a new setting to control JPEG compression quality (60-100%, default 90%)
- This allows users to balance between image quality and file size
- The setting is applied when saving JPEG images after processing
- Selective Size Processing
- Added the ability to choose which image sizes should be processed as square thumbnails
- Displays all registered image sizes with their dimensions
- WooCommerce sizes are highlighted in purple and shown first for easy identification
- Added quick selector buttons:
- Select All
- Select None
- Select WooCommerce Only
- Select WordPress Default
-
If no sizes are selected, all sizes will be processed (backward compatible)
Additional improvements:
-
Enhanced the settings page layout with two new sections
- Updated JavaScript to handle the new settings
- Added proper validation and sanitization for new options
- Improved logging to show which sizes are being skipped
-
Created comprehensive changelog and documentation
The plugin now offers much more granular control over thumbnail generation, which is especially useful for
WooCommerce stores that want to optimize performance by only processing the sizes they actually use.
NEW FEATURES
-
Small Image Handling (v2.2.0)
Purpose: Prevent WooCommerce products from disappearing when using small images
Features:
– Minimum Image Size setting: Set custom threshold (50-1000 pixels)
– Small Image Action options:
– Skip processing (preserve original)
– Process anyway (center on square canvas)
– Show error message
– Default: Skip images smaller than 200×200 pixels
How to use:
1. Go to Media > Square Thumbnails
2. Find „Small Image Handling“ section
3. Set minimum size and choose action for small images
4. Save settings
-
JPEG Quality Control (v2.3.0)
Purpose: Balance between image quality and file size
Features:
– Adjustable JPEG quality (60-100%)
– Default: 90%
– Applies to all JPEG thumbnails generated
How to use:
1. Go to Media > Square Thumbnails
2. Find „JPEG Quality“ section
3. Adjust slider between 60-100%
4. Save settings
-
Selective Size Processing (v2.3.0)
Purpose: Process only specific image sizes, perfect for WooCommerce optimization
Features:
– Choose which image sizes to make square
– Quick selectors:
– Select All
– Select None
– Select WooCommerce Only
– Select WordPress Default
– WooCommerce sizes highlighted in purple
How to use:
1. Go to Media > Square Thumbnails
2. Find „Selective Size Processing“ section
3. Check/uncheck sizes to process
4. Use quick selectors for common combinations
5. Save settings
-
Bulk Thumbnail Regeneration (v2.3.0)
Purpose: Regenerate existing thumbnails with current settings
Features:
– Progress bar with real-time updates
– Batch processing (5 images at a time)
– Force regeneration option
– Selective size regeneration
How to use:
1. Go to Media > Square Thumbnails
2. Find „Regenerate Thumbnails“ section
3. Select sizes to regenerate
4. Check „Force regeneration“ if needed
5. Click „Start Regeneration“
6. Watch progress bar until complete
-
Media Library Integration (v2.3.0)
Purpose: Regenerate thumbnails directly from Media Library
Features:
– Individual image regeneration button
– Bulk action for multiple images
– Real-time feedback
– Admin notices for results
How to use:
For single images:
1. Go to Media > Library
2. Click on any image
3. Find „Square Thumbnails“ section
4. Click „Regenerate Square Thumbnails“
5. Wait for success message
For multiple images:
1. Go to Media > Library
2. Select images using checkboxes
3. Choose „Regenerate Square Thumbnails“ from Bulk Actions
4. Click „Apply“
5. See admin notice with results
KEY IMPROVEMENTS
- Performance: Only processes selected sizes, reducing server load
- WooCommerce Compatibility: Prevents product display issues with small images
- User Experience: Better feedback with progress bars and admin notices
- Flexibility: Granular control over which sizes to process
- Convenience: Regenerate thumbnails without leaving Media Library
Features
- Creates square thumbnails without cropping
- Aligns images horizontally and vertically within the square frame
- Supports custom background colors or auto-detection from image
- Option for transparent backgrounds (PNG, WebP, AVIF)
- Creates all intermediate sizes, even for smaller images
- Apply to original images or just thumbnails
- Support for modern image formats (WebP, AVIF)
- Small image handling options to prevent WooCommerce display issues
- Configurable minimum image size settings
Perfect for
- WooCommerce product galleries
- Portfolio websites
- Image galleries
- Any site requiring consistent square thumbnails
Instalacija
- Upload
square-thumbnails
folder to the/wp-content/plugins/
directory - Activate the plugin through the ‚Plugins‘ menu in WordPress
- Configure settings under Media > Square Thumbnails
HSP
-
Does this plugin crop my images?
-
No! The plugin fits the entire image within a square frame without cropping any part of it.
-
What image formats are supported?
-
The plugin supports JPEG/JPG, PNG, GIF, and with proper server configuration: WebP, AVIF, and BMP.
-
Why are my WooCommerce products not showing?
-
This was a known issue with images smaller than 200×200 pixels. Version 2.2.0 fixes this with new small image handling options.
-
Can I use transparent backgrounds?
-
Yes! Transparent backgrounds are supported for PNG, WebP, and AVIF formats.
-
Can I control JPEG quality?
-
Yes! Version 2.3.0 introduces a JPEG quality setting, allowing you to balance between image quality and file size. The default is 90%.
-
Can I choose which image sizes to make square?
-
Absolutely! Version 2.3.0 adds selective size processing. You can choose specific sizes (like only WooCommerce thumbnails) or use quick selectors for common combinations. If no sizes are selected, all sizes will be processed.
-
Can I regenerate existing thumbnails?
-
Yes! Version 2.3.0 adds bulk thumbnail regeneration. You can select which sizes to regenerate and choose whether to force regeneration of existing thumbnails or only create missing ones. The process includes progress tracking and batch processing for better performance.
-
Can I regenerate thumbnails from the Media Library?
-
Absolutely! Version 2.3.0 adds Media Library integration. You can regenerate square thumbnails for individual images directly from the attachment details, or use the bulk action to regenerate multiple images at once.
Pohódnoćenja
Sobuskutkowarjo a wuwiwarjo
„Square Thumbnails“ je softwara wotewrjeneho žórła. Slědowacy ludźo su k tutomu tykačej přinošowali.
SobuskutkowarjoPřełožće „Square Thumbnails“ do swojeje rěče.
Na wuwiću zajimowany?
Přehladajće kod, hladajće do SVN-repozitorija abo abonujće wuwiwanski protokol přez RSS.
Protokol změnow
2.3.0 – 2025-01-16
Fixing functionality.
2.3.0 – 2025-01-16
- New Feature: Media Library integration for regenerating thumbnails
- Added: Regenerate button in attachment details screen
- Added: Bulk action „Regenerate Square Thumbnails“ in Media Library
- Enhanced: Better user feedback with admin notices
- Improved: AJAX handling for single image regeneration
- New Feature: Bulk thumbnail regeneration with selective size processing
- Added: Progress tracking for regeneration with visual progress bar
- Added: Option to force regenerate existing thumbnails or only create missing ones
- Added: Batch processing for better performance (5 images at a time)
- Added: Separate quick selectors for regeneration section
- Enhanced: AJAX handling for smooth operation without page refresh
- Improved: Memory management during bulk operations
- Fixed: Image processing for individual thumbnail sizes
- Fixed: Selective size processing now works correctly
- New Feature: JPEG quality control setting (60-100%, default 90%)
- New Feature: Selective size processing – choose which image sizes to make square
- Added: Quick selector buttons for WooCommerce and WordPress default sizes
- Added: Visual highlighting for WooCommerce-specific image sizes
- Enhanced: Settings interface with better organization and controls
- Improved: Performance by only processing selected image sizes
2.2.0 – 2025-01-15
- New Feature: Comprehensive small image handling system
- Configurable minimum size threshold (50-1000 pixels)
- Three action options for images below threshold
- Prevents WooCommerce product display failures
- Added: „Small Image Handling“ settings section
- Minimum Image Size: Set custom threshold (default 200px)
- Small Image Action: Choose how to handle small images
- Fixed: Critical bug where products with small thumbnails wouldn’t display in WooCommerce
- Improved: Image processing logic for edge cases
- Enhanced: Admin interface with clearer options
- Added: Detailed logging for small image processing
- Compatibility: Better integration with WooCommerce product galleries
2.1.1 – 2024-15-01
- Critical Fix: Users without manage_options capability (e.g., Authors, Contributors, Editors) can now properly
access their profile page (/wp-admin/profile.php) and other admin areas - Fix: Moved permission check from display_admin_page() to showPage() method to prevent global admin access
blocking - Security: Settings page remains properly protected – only administrators can access Square Thumbnails options
- Addresses reported issue: „Plugin is blocking access to /wp-admin/profile.php and /wp-admin/ in general to
users without manage_options capability“
2.1.0
- New: Added transparent background option for square thumbnails
- New: Support for modern image formats including WebP and AVIF
- New: Added BMP format support with improved handling
- New: Format compatibility checker in settings page showing supported formats
- New: Elegant new settings page design with improved UI/UX
- New: Background type selector (Custom Color, Color from Image, Transparent)
- New: AJAX settings save with visual feedback
- New: Auto-hide/show options based on background type selection
- Improved: Enhanced error handling for unsupported formats
- Improved: Better memory management for large images
- Improved: Transparency support for PNG, WebP, and AVIF formats
- Improved: Added proper nonce security for settings save
- Improved: Sanitization of all input values
- Fixed: Settings not saving properly in some configurations
-
Fixed: Color picker display issues
Requirements
Minimum Requirements
-
WordPress 3.5 or higher
- PHP 7.2 or higher
-
GD Library enabled
Recommended Requirements
-
WordPress 6.0 or higher
- PHP 8.0 or higher
-
GD Library with WebP and AVIF support
Supported Image Formats
-
Always supported: JPEG/JPG, PNG, GIF
- Requires PHP with GD WebP support: WebP images
- Requires PHP 8.1+ with GD AVIF support: AVIF images
-
Additional formats: BMP, WBMP (when available)
Transparency Support
-
Transparency is supported for: PNG, WebP, AVIF
- Transparency NOT supported for: JPEG/JPG, GIF, BMP
-
When transparency is selected for unsupported formats, a white background will be used
Background Options
- Custom Color – Choose any color for the background
- Color from Image – Automatically use the top-left pixel color from the image
-
Transparent – Preserve transparency for PNG, WebP, and AVIF images
Notes
- WebP support requires PHP compiled with WebP support in GD library
- AVIF support requires PHP 8.1+ and GD library compiled with AVIF support
- Transparent backgrounds only work with formats that support alpha channel
- Contact your hosting provider to enable modern image format support if not available
2.0.2
Removed donation link in admin.
1.1.2
Fixed all errors displayed in plugin check
1.1.1
Fixed vulnerability reported by wordfence
A vulnerability in this plugin has been reported:
https://www.wordfence.com/threat-intel/vulnerabilities/id/31cc30c7-262d-4582-8976-fc8095bdca5f?source=api-prod
1.0.4
Major update for the entire code and fixes for all bugs.
Some new options were added:
– option to choose if original image should be also put in a square
– option to choose if you want to be created all existing sizes, even if the original image is smaller than some of them. WP by default is not creating thumbnails larger than the original image is.
1.0.3
Fixed the bug reported by @chuchilade and by @peer_012. The bug was caused by hex to rgb color conversion.
1.0.2
Fix for eregi deprecation. thanks to mjassen (https://wordpress.org/support/users/mjjojo/) for reporting this error and for helping to fix.
1.0.1
- Horizontal align of the image in the frame
- Vertical align of the image in the frame
- Set background color of the frame or check to automatically read the color from the image, point (0,0)
1.0
- Initial release.