=== Crates Product Image Processor for WooCommerce ===
Contributors: cratesdigital, ahmd3tf
Stable tag: 1.2.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Automatically trims, resizes, and pads product images onto a branded canvas background when uploaded directly to WooCommerce products.
== Description ==
This plugin automates the process of standardizing product images for WooCommerce. When you upload an image inside a Product page, the plugin automatically:
* Removes excess whitespace, borders, and margins around the actual product object.
* Corrects rotated images from phone/camera uploads before processing.
* Creates a customized square or rectangular canvas layout.
* Colors the canvas background with your specific branding hex color.
* Centers the object while applying a perfect offset padding boundary.
* Optionally scales up undersized images to fill the canvas, or keeps them at native resolution to avoid pixelation.
This entirely cuts out manual Photoshop work during catalog data entry workflows. It completely ignores images uploaded to standard pages, posts, or sliders.
== Installation ==
1. Upload the `product-image-processor` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Configure your canvas sizing, padding, and background preferences under Settings -> Product Image Processor.
== Changelog ==
= 1.2.0 =
* Renamed all functions, options, and settings to use a unique plugin-specific prefix.
* Added proper sanitize callbacks to every registered setting.
* Original file backups now save to a dedicated plugin subdirectory under the uploads folder instead of alongside the processed image.
= 1.1.0 =
* Fixed a fatal error caused by a call to a non-existent Imagick method during trim calculation, which previously prevented processing from completing.
* Changed image compositing so the canvas background color no longer blends into the product photo's own colors.
* Added a setting to control whether undersized images are upscaled to fill the canvas, or kept at native resolution and centered.
* Added automatic EXIF orientation correction so images from phone cameras are no longer processed sideways or upside-down.
* Added a permission check so only users able to edit the given product can trigger image processing.
* The original uploaded file is now preserved before processing, in case the configured settings produce an unwanted result.
* Added memory safeguards so unusually large uploads can't exhaust server resources.
* Processing failures are now logged instead of failing silently.