=== Square Thumbnails === Contributors: ilmdesigns Donate link: https://www.paypal.com/paypalme/narcisbodea Tags: crop, woocommerce, square thumbnails Requires at least: 3.5 Tested up to: 6.8.1 Stable tag: 2.2.0 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Creates square thumbnails from images without cropping. Works like CSS background-size: contain. == Description == 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. = 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 == Installation == 1. Upload `square-thumbnails` folder to the `/wp-content/plugins/` directory 2. Activate the plugin through the 'Plugins' menu in WordPress 3. Configure settings under Media > Square Thumbnails == Frequently Asked Questions == = 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. == Screenshots == Here is a screenshot with the same image uploaded, but without plugin activated and with crop checked in media settings, so you can see that the image is cut. 1. screenshot-1.png Here is a screen shot with an uploaded image when the plugin is activated. You can see that the image is visible without being cut and also the thumbnails are square. 2. screenshot-2.png == Changelog == = 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 7.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 1. Custom Color - Choose any color for the background 2. Color from Image - Automatically use the top-left pixel color from the image 3. 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.