
A plugin for creating square thumbnails from images, without cropping them. It is very useful…
Square Thumbnails PRO will be available soon. All features currently in the free version will remain free and unrestricted.
Square Thumbnails transforms your images into perfect square thumbnails without cropping or distorting them. Instead of cutting off important parts of your images, the plugin fits them entirely within a square frame, similar to CSS background-size: contain. Ideal for WooCommerce shops, portfolios, and image galleries where consistency is essential, but you don’t want to lose parts of your images.
Key Features
- No Cropping: Preserves the entire image within a square frame
- Background Options: Transparent or colored backgrounds (custom or auto-detected)
- Format Support: Works with JPEG, PNG, GIF, WebP, AVIF, and BMP
- Quality Control: Adjustable JPEG quality settings (60-100%)
- Selective Processing: Choose which image sizes to convert to squares
- Small Image Handling: Special options for handling small images
- Individual image regeneration: Easily regenerate only one image from image details page
- Bulk Regeneration Option (included): Easily update existing thumbnails with progress tracking. No need to use other plugins to regenerate images
- WooCommerce Ready: Perfect for product galleries with uniform thumbnails
- Newsletter Integration: Add newsletter subscription forms with Mailchimp integration
Perfect for online stores where you want all products to have uniform square thumbnails while maintaining complete product visibility.
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
Screenshots

With the plugin: the whole image fits inside the square thumbnail in the Media Library.

Without the plugin: WordPress crops the same image to a square and cuts the text.

Shape: fit the whole image or crop it, trim margins and give every product the same size.

Live Preview: a sample image with the current settings, next to what WordPress makes.

Regeneration: the whole library with a progress bar, or a Background Batch run on the server with pause and cancel.

Settings: the formats your server supports and the apply options.

Settings: background, small image handling and JPEG quality.

Settings: which image sizes become square.

In the attachment details: the image's own settings and Regenerate Square Thumbnails.
FAQ
Does it crop my thumbnails?
Not by default. The whole image is scaled to fit the square, and the space left over gets your background color. Under Shape you can choose to crop instead: to the center, around a focal point, or by smart crop.
WordPress crops one size itself: the 150×150 thumbnail. Turn on Force Square and regenerate: it also rebuilds sizes WordPress already crops square, like the 150 × 150 thumbnail, so they show the whole image. Without it, browsers can pick the cropped version for small product tiles.
Why is my thumbnail background black?
The default background is white. A black background usually means one of these:
- Color from Image is selected and the top-left pixel of the image is dark or transparent.
- Transparent was selected for a GIF or BMP image before 3.0. Since 3.0 a GIF thumbnail keeps one transparent color and a BMP thumbnail gets your custom color, white by default. PNG, WebP and AVIF keep full transparency, and JPEG thumbnails are saved as PNG to keep it.
- The thumbnail was created before you changed the setting.
To fix it, open Media > Square Thumbnails, choose Custom Color, pick a color, then regenerate with Force regeneration ticked.
Can I make only WooCommerce images square and leave blog images alone?
Yes. By default every image size is processed, including the sizes themes use for blog posts. To limit it:
- In Media > Square Thumbnails, under Selective Size Processing, click Select WooCommerce Only, then tick
thumbnail as well. Browsers can use that size for small product tiles.
- Turn on Force Square.
- To fix images you already uploaded, make the same selection under Regenerate Thumbnails (it has its own list), tick Force regeneration and start.
The other sizes go back to normal WordPress thumbnails. The choice applies per image size. To choose by post type instead, for example products only, use Post Types. A single image can also be excluded from its own settings in the Media Library.
WooCommerce thumbnails still look cropped or show the wrong image. What should I check?
- Turn on Force Square, then regenerate with Force regeneration ticked. Images uploaded before the plugin was active keep their old thumbnails until you do, and without this option cropped thumbnails that are already square are skipped.
- Clear your caches. Square thumbnails are new files with
-sqt in the name, so a page cache or the browser can keep showing the old ones.
- Check which size your theme or block displays. The plugin makes registered image sizes square. A layout that shows the full-size image displays your original photo.
On the single product page, WooCommerce normally shows the photo in its own shape: whole, but not square.
Does it work with block themes and the Product Collection block?
Yes. Classic themes and the [products] shortcode use the WooCommerce thumbnail sizes, so they show the square versions.
WooCommerce’s block-based shop page uses the large size instead and crops it with CSS. To show whole images there, turn on Whole Images in Block Grids under WooCommerce Block Grids. It changes only the style of those grids; your files stay as they are.
Will image quality drop?
Each square thumbnail is built from the full-size image, not from a smaller copy. You set the JPEG quality, from 60 to 100 (90 by default), and the WebP and AVIF quality under Modern Formats. If thumbnails look soft, raise the quality and regenerate, or upload a larger image.
What happens to small images?
An image with a width or height under 200 pixels is left as it is by default. Under Small Image Handling you can change that minimum or choose Process anyway.
Leave Create Missing Sizes off unless you need it. For sizes larger than the image, it saves one enlarged square copy and uses it for all of them. It looks soft and uses more memory. With Force Square off, only WooCommerce sizes get this copy.
What if an image is too large for my server?
When an image is too large to square in the memory your server gives PHP, it keeps the thumbnails WordPress made, and its details in the Media Library say why, instead of the upload stopping with an error. Server Check on the settings page shows the largest image your server can square.
How do I regenerate thumbnails for images I already uploaded?
New uploads are handled automatically. For existing images:
- All images, in the background: open Media > Square Thumbnails, go to Background Batch, choose the sizes under Regenerate Thumbnails and click Start Batch. It works through your library in short steps, can wait for a night window, and can be paused, cancelled or undone.
- All images, while you watch: go to Regenerate Thumbnails, choose the sizes, tick Force regeneration and click Start Regeneration.
- One image: open it in the Media Library and click Regenerate Square Thumbnails.
- A selection: in the Media Library list view, tick the images and choose Regenerate Square Thumbnails from Bulk actions.
After changing the background or alignment, use one of the first two. The bulk action skips non-WooCommerce thumbnails that are already square unless Force Square is on.
Does the Background Batch need WordPress’s scheduled tasks?
It uses them when they run. On a site where they are turned off and no server cron runs them, the batch moves on only while its settings page is open. Server Check tells you which case your site is in.
Can I undo a regeneration?
A Background Batch or WP-CLI run can be undone with Undo Last Run, which gives each image back the thumbnails and record it had before the run. The copies it keeps for that take space in your uploads folder, and the page shows how much. They are deleted when the next run starts, 30 days after the run, or when you click Delete undo copies now. The regeneration with the progress bar can’t be undone.
Why do some square thumbnails have a code in their name?
Thumbnails made with a 3.0 setting, such as a crop or a modern format, carry a short code of their settings in the file name, for example photo-300x300-sqt-1a2b3c.webp. When those settings change, the new thumbnails get new names, so no cache keeps showing the old ones. Thumbnails made with the earlier settings keep the names they always had.
What happens to thumbnails my posts link to?
When a setting changes how square thumbnails look or their format, 3.0 writes new files and removes the ones they replace. A replaced thumbnail whose address is written in the content of a post, page or product stays on disk, so it keeps showing there as it was. Images placed by your theme, by WooCommerce or by anything else that follows the Media Library switch to the new files by themselves. Addresses that a page builder keeps outside the post content are not checked, so on such a site, after a Background Batch, look at those pages before you delete the undo copies.
Can I go back to version 2.5?
Yes. Images keep the thumbnails 3.0 made, because WordPress still points to them. A regeneration with 2.5 makes them again with 2.5’s settings, so crops, trims and modern formats become fitted squares again.
Are my original images changed?
No. The file you upload is never overwritten. Square thumbnails are saved as separate files with -sqt in the name, next to the thumbnails WordPress made. Apply to Original doesn’t overwrite your file either: it saves a square copy of the full-size image beside it.
What happens if I deactivate or delete the plugin?
Nothing is undone. Existing images keep their square thumbnails, because WordPress still points to those files, and new uploads get normal WordPress thumbnails.
To return existing images to normal, regenerate them while the plugin is inactive, with a regeneration tool or wp media regenerate in WP-CLI, or use Restore WordPress Thumbnails on each image while it is active. Your settings and the settings of single images stay in the database, even after you delete the plugin. Deleting it removes only its run data and undo copies.
ChangeLog
3.0
- New, all off until you turn them on: crop to the center, around a focal point or by smart crop; trim margins and same-size products; color from the image edges and removal of plain backgrounds; WebP and AVIF square thumbnails with measured savings.
- New: Background Batch with pause, cancel, a night window and undo of the last run, and WP-CLI commands.
- New: Live Preview, settings for single images in the Media Library, Post Types, whole images in WooCommerce block grids and a Server Check.
- Fixed: GIF and BMP thumbnails with Transparent selected came out black. A GIF now keeps a transparent color, and a BMP gets the custom color, white by default.
- Fixed: an image too large for the server’s memory no longer stops the upload with an error; it keeps WordPress’s thumbnails and says why.
- Fixed: regenerating the library from the settings page no longer drops the link to the original upload and the camera data (title, caption, credit, copyright, keywords) of images larger than 2,560 pixels or turned by WordPress at upload.
- Clearer help for Force Square, Apply to Original and Create Missing Sizes.
2.5
- Security and reliability improvements.
- Compatibility with WordPress 7.1, current PHP and WooCommerce.
- Removed unused notices and sign-up forms.
- Added a dismissible recommendation on the settings page for WooCommerce stores.
- Added a one-time notice on the Dashboard after updating.
2.4.0
2.3.8
- Fixed WooCommerce zoom gallery CSS issue when ‘tooriginal’ option is enabled
- Added additional validation for image dimensions to prevent PHP errors
- Added proper fallback dimensions for invalid source images
- Enhanced error handling for image processing
2.3.7
- Fixed PHP 8.2 compatibility issues
- Improved WooCommerce integration
- Fixed bug with transparent background handling
- Added: CSS fix for WooCommerce zoom gallery when tooriginal option is enabled (
.pswp__zoom-wrap img { height: auto !important; })
- Improved: Conditional loading of CSS only when needed
2.3.6
- Fixed: Critical PHP fatal error caused by imagecreatetruecolor() being called with invalid dimensions
- Improved: Added robust validation for image dimensions throughout the processing pipeline
- Fixed: Proper handling of zero or negative width/height values in thumbnail processing
- Enhanced: Better error logging for invalid image dimensions
- Added: Default fallback dimensions for invalid source images
- Improved: Protection against division by zero errors in image ratio calculations
2.3.5
- Fix to delete all thumbnails when an image is deleted from media. The same for the PNG set created if the background is set to transparent.
2.3.4
- There were some problems in regenerating and are all fixed.
2.3.3
2.3.0
- 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
- New Feature: Comprehensive small image handling system (configurable minimum size threshold of 50-1000 pixels, three action options for images below it, prevents WooCommerce product display failures)
- Added: “Small Image Handling” settings section (Minimum Image Size, default 200px, and Small Image Action)
- 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
- 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
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: 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.
- New option to choose if the original image should also be put in a square
- New option to create all existing sizes, even if the original image is smaller than some of them. By default, WordPress doesn’t create thumbnails larger than the original image.
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