Descripció
Crates Product Image Processor saves you from manually opening every product photo in Photoshop before it goes live. As soon as an image is uploaded directly on a WooCommerce Product edit screen, the plugin steps in — before WordPress even generates its thumbnail sizes — and automatically standardizes it to your store’s exact specifications.
What it does to each image:
- Trims the background. Detects and removes existing whitespace, margins, or near-white backgrounds around the product using a configurable tolerance («fuzz»), so a raw, ungrouped product photo is reduced to just the product itself.
- Removes the leftover edge halo — without eating into the product. A plain trim rarely gets a perfectly clean cut, and a faint sliver of the old backdrop usually survives at the edges. The plugin clears that residual halo starting from the image corners, so it only removes background actually connected to the edge — white packaging, labels, garments and highlights inside the product are untouched. It uses its own conservative tolerance, separate from the trim tolerance, and automatically backs that tolerance off if it detects the removal spreading into the product.
- Corrects rotation automatically. Reads EXIF orientation data so photos taken on a phone or camera are processed right-side up, without you having to rotate them first.
- Normalizes colour. Supplier photography often arrives in CMYK. Images are converted to sRGB before compositing, so colours don’t shift when the product lands on the canvas.
- Places the product on a branded canvas. Centers the trimmed product on a canvas of your exact chosen width and height, with your specified background color and a consistent padding offset around every product — so your whole catalog has matching proportions and framing.
- Handles small images sensibly. By default, a product photo smaller than your canvas’s usable area is kept at its native resolution and simply centered, to avoid pixelation. If you’d rather have every image stretched to fully fill the canvas instead, you can turn that on in settings.
- Keeps your original safe. Before overwriting the uploaded file, the plugin saves an untouched copy of the original in a dedicated folder in your uploads directory — so a setting you’re not happy with never means re-uploading from scratch.
Bulk-process existing images, on your terms.
New uploads are processed automatically, but what about the products you added before installing this plugin? Under Media Bulk Process Images, you can open the familiar WordPress Media Library picker, hand-select exactly the images you want processed, and run them through the same canvas pipeline — with a progress bar and a per-image success/failure log. Nothing is selected by default and nothing runs automatically: since many sites reuse the same Media Library for blog posts, sliders, and other design elements that should never be touched, this tool only ever processes images you explicitly pick.
Where it applies (and where it doesn’t):
This only ever runs on images uploaded directly through a WooCommerce Product edit screen (including the product gallery uploader). Uploads to regular posts, pages, sliders, or any other part of your site are left completely untouched.
Requirements:
- The PHP Imagick extension must be installed and enabled on your server. If it isn’t available, the plugin simply leaves uploads unprocessed rather than causing an error.
- Currently supports JPEG and PNG uploads.
- WooCommerce must be active, since processing is scoped to the
productpost type.
Instal·lació
- Upload the
product-image-processorfolder to the/wp-content/plugins/directory, or install directly from Plugins Add New by searching for «Crates Product Image Processor for WooCommerce.» - Activate the plugin through the ‘Plugins’ menu in WordPress.
- Go to Settings Product Image Processor to configure:
- Canvas width and height (in pixels)
- Internal padding/offset between the product and the canvas edge
- Canvas background color (hex)
- Trim tolerance / fuzz percentage
- Background removal tolerance (keep this low — see the FAQ)
- Whether undersized images should be upscaled to fill the canvas
- Upload a new image on any WooCommerce product to see it applied automatically.
PMF
-
Does this affect images uploaded to regular posts or pages?
-
No. Processing only triggers for uploads made directly on a WooCommerce Product edit screen. Everything else is left exactly as uploaded.
-
Will white products come out with holes in them?
-
No. Background removal is anchored to the edges of the image and only travels through background that is connected to a corner, so it stops at the product’s outline. Areas of the same colour that sit inside the product — a white label, white packaging, a bright highlight — are preserved.
(If you are upgrading from 1.3.0 or earlier, this was not the case, and any images processed by those versions may need to be restored from their backups and re-processed. See the 1.3.1 changelog.)
-
What happens to my original image?
-
A copy of the untouched original is saved automatically before processing, in a dedicated subfolder inside your site’s uploads directory (
wp-content/uploads/cdpip-originals/). The folder ships with an.htaccessfile that blocks direct access on Apache; on nginx you will need an equivalentlocationblock in your server config, since nginx ignores.htaccess. Uninstalling the plugin does not delete these backups.If you re-process an image that has already been through the plugin, the existing backup is kept as-is rather than being replaced with a copy of the already-processed file.
-
What if the trim cuts off part of my product, or leaves too much background?
-
Adjust the «Trim Tolerance / Fuzz» setting. Lower it if the trim is too aggressive and removing parts of the product; raise it if too much background is being left behind. Trimming works inward from the edges and stops as soon as it meets the product, so a generous value here is safe.
-
Part of my product looks chewed away or dissolved at the edges. Why?
-
That is the «Background Removal Tolerance» setting being too high for that product. The two tolerance settings do very different things. Trimming crops the outer margin and stops at the product. Background removal spreads inward from the image corners, so if the tolerance is wide enough to include the product’s own colour, it will flow out of the backdrop and into the product.
This mostly affects light-coloured products — silver, white, pale grey — photographed on a white backdrop, where the body may be only 10-15% away from the background colour. Lower the setting (the default of 6% is safe for almost everything), or set it to 0 to skip background removal entirely and keep the trimmed image exactly as-is.
The plugin also checks this automatically: before committing, it measures whether the configured tolerance is spreading further than a thin edge halo could account for, and reduces it if so. When that happens it is noted in your server error log.
-
Does this require any special server software?
-
Yes — the PHP Imagick extension. Most managed WordPress and WooCommerce hosts include this by default. If it isn’t installed, the plugin will simply skip processing rather than break your uploads.
-
Can I reprocess images that were uploaded before I installed the plugin?
-
Yes — go to Media Bulk Process Images, select the specific images you want processed from the Media Library picker, and run them through the same processing pipeline. You choose exactly which images are affected; nothing is processed automatically. This also regenerates the image’s thumbnail sizes afterward, so everything stays consistent across your site.
-
Who can use the bulk processor?
-
Administrators and Shop Managers (anyone with the
manage_woocommercecapability). It used to require onlyupload_files, which Authors also hold — too broad for a tool that overwrites files used across the whole site. Developers can adjust this with thecdpip_bulk_capabilityfilter. -
Will small product photos look blurry or stretched?
-
Only if you’ve explicitly enabled the «Upscale Small Images» setting. By default, images smaller than the canvas area are kept at their original resolution and centered rather than stretched.
Ressenyes
No hi ha ressenyes per a aquesta extensió.
Col·laboradors i desenvolupadors
«Crates Product Image Processor for WooCommerce» és programari de codi obert. La següent gent ha col·laborat en aquesta extensió.
Col·laboradorsTraduïu «Crates Product Image Processor for WooCommerce» a la vostra llengua.
Interessats en el desenvolupament?
Navegueu pel codi, baixeu-vos el repositori SVN, o subscriviu-vos al registre de desenvolupament per fisl de subscripció RSS.
Registre de canvis
1.3.2
- Fixed light-coloured products being partially erased. Background removal shared a single tolerance setting with trimming, but the two behave very differently: trimming stops when it meets the product, while background removal spreads inward from the corners. At the default 20%, a silver or pale-grey product photographed on white (whose body can be only 10-15% away from the background colour) let the removal escape the backdrop and eat ragged chunks out of the chassis.
- Added a separate Background Removal Tolerance setting, defaulting to a conservative 6%. Set it to 0 to disable background removal entirely and keep the trimmed image exactly as-is.
- Added an automatic leak guard: before committing, the plugin measures whether the configured tolerance removes materially more of the frame than a thin edge halo could account for, and steps it down until it doesn’t. Reductions are noted in the server error log. Tunable via the
cdpip_background_leak_tolerancefilter. - The trim tolerance setting now only affects trimming, and its description has been clarified accordingly.
1.3.1
- Fixed a significant image-quality bug: the halo-removal step was a global operation, so at typical fuzz settings it made every near-white pixel transparent — including white areas inside the product, which then filled with the canvas background color. White packaging, labels, garments and specular highlights were being erased. Background removal is now a corner-anchored flood fill that only affects background connected to the image edge.
- Fixed bulk processing deleting an attachment’s thumbnail files before confirming that processing succeeded, which could leave attachment metadata pointing at files that no longer existed.
- Fixed bulk processing discarding the
original_imagemetadata key, which brokewp_get_original_image_path()and orphaned-originalfiles on disk. - Fixed the «trimmed to nothing» safety check, which tested for a zero-width result. ImageMagick returns a 1×1 image in that case, so near-solid-color sources were being blown up into a single-pixel smear.
- Fixed fractional composite coordinates on odd-sized images, which emitted implicit-conversion deprecation notices on PHP 8.1+ and would be a fatal error on PHP 9.
- Fixed the bulk progress counter reporting failed images as successfully processed.
- Added
Requires Plugins,Requires at least,Requires PHPandText Domainto the plugin header. The WooCommerce dependency was declared only in readme.txt, where WordPress does not read it, so it was never actually enforced. - Padding is now validated against your canvas size when saved. A padding value of half the canvas or more previously left no drawable area and silently skipped every image with no feedback.
- JPEG output now honors WordPress’s
jpeg_qualityfilter instead of falling back to Imagick’s default. - Source images are converted to sRGB before compositing, so CMYK supplier photography no longer shifts color.
- Resizing now uses an explicitly calculated ratio with a Lanczos filter rather than
scaleImage()bestfit — sharper downscales, and predictable behavior for the «upscale small images» option across Imagick builds. - Re-processing an already-processed image no longer overwrites its original backup, and the bulk tool now warns before running images through a second time.
- The bulk processor now requires
manage_woocommercerather thanupload_files, filterable viacdpip_bulk_capability. - The backups folder now ships an
.htaccessblocking direct access on Apache. - Added Imagick handle cleanup on the error path, a guard against a missing attachment file path, error-log entries that name the file that failed, an
uninstall.php, and text-domain wrapping throughout.
1.3.0
- Added a Bulk Process Images tool under Media Bulk Process Images, using the standard Media Library picker to hand-select existing images for retroactive processing.
- Bulk processing now regenerates thumbnail sizes and removes stale thumbnail files after reprocessing an image.
- Original images are still backed up automatically before bulk processing overwrites them.
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.
1.0.3
- Fix stable tag alignment and add explicit nonce verification fallbacks for media routing handlers.


