=== CatCode Merchant Image Audit for WooCommerce ===
Contributors: catcodestudio
Tags: google merchant center, product images, image size, product feed, woocommerce
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Finds product images smaller than 500×500 px, the Google Merchant Center minimum from 31 January 2027, and larger originals already on your site.

== Description ==

Google Merchant Center is raising the minimum size of product images — `image_link` and `additional_image_link` — to 500×500 pixels for all product categories. Merchant Center has shown the warning "Image too small for upcoming enforcement" since 14 April 2026, and enforcement starts on 31 January 2027. Google says it will optimize some smaller images itself, but it does not say which ones.

A shop that has been importing products for years can have thousands of such images and no way to see them: WordPress shows every picture as a neat thumbnail. Merchant Image Audit checks every product image against the minimum and tells you exactly which products need attention.

**The audit**

* Checks the main image, the gallery and the variation images of every product — the same images Google for WooCommerce sends: the main image (or the first gallery image when there is none) as `image_link`, the gallery as `additional_image_link`; a variation without its own image uses the parent's.
* Measures the full-size image WordPress serves, from the size WordPress stored on upload; the file itself is read only when that size is missing. Nothing in the shop is changed.
* Works in small steps, so a catalogue of tens of thousands of products does not run into server time limits.
* Also reports files that are gone from the server, formats Google does not accept (Google accepts JPEG, WebP, PNG, GIF, BMP and TIFF) and images over Google's limits of 64 megapixels or 16 MB.
* Counts the images that pass the minimum but stay under the 1500×1500 px Google recommends.

**A verdict for every offer**

* **OK** — the main image is large enough.
* **Large image in the gallery** — the main image is too small, but the product has a large gallery image that could take its place.
* **No image large enough** — this offer needs a new photo or a larger original.
* **Unusable** — the main image file is missing, in a format Google does not accept, or over the limits.
* **No image**.

Plus a separate list of products whose main image is fine but whose gallery has small images.

**Larger originals that are already on the site**

Very often a small product image is a thumbnail — a file whose name ends in -300x300 — that was uploaded or imported as an image of its own, while the full picture is still there. The audit finds:

* the full image with the same name in the media library;
* the full image as a file in the same folder that is not in the media library;
* an image that was cropped in the WordPress image editor, whose untouched original WordPress keeps ("Restore original image").

**Where you see the result**

* An overview with the counters.
* A list of products with thumbnails, sizes and the reason, filtered by verdict, with links to edit each product.
* A "Google image" column in Products and a box on the product edit screen.
* CSV export — one line per image, with SKU, URL, size and where the larger original is; comma or semicolon separated, opens in Excel and Google Sheets.
* WP-CLI: `wp catcode-mia scan`, `wp catcode-mia summary`, `wp catcode-mia export file.csv`.

Products are re-checked when they are saved or when one of their images is edited, so the list stays current while you fix it.

The plugin never enlarges an image and never adds a frame around it: Google's image requirements say not to use an image with a border, and an enlarged small picture is still a small picture.


== Installation ==

1. Install and activate the plugin. WooCommerce must be active.
2. Open WooCommerce → Merchant Image Audit and click "Run the audit".
3. Open the list of products, or download the CSV.

== Frequently Asked Questions ==

= Does the plugin change my products or images? =

The audit does not. It only reads the sizes of the images and stores the result in its own tables.

= Which minimum does it use? =

500×500 px by default — Google Merchant Center's minimum for `image_link` and `additional_image_link` from 31 January 2027. You can raise it in the settings, for example to 1500×1500 px, the size Google recommends.

= Can I just enlarge the small images? =

The plugin does not do it. Google's help page for `image_link` sets the minimum and does not say that enlarged images are accepted, and an enlarged small picture does not get any sharper. Use a larger original or a new photo.

= My feed plugin sends a smaller image size. Is the audit still right? =

The audit checks the full-size image. Some feed plugins let you choose which image size goes into the feed; if yours sends a smaller size, Google gets that smaller image. Set the feed to the full size.

= My images are offloaded to S3 or another cloud storage. =

Switch off "Check that files exist" in the settings: the audit then relies on the sizes WordPress stored and does not look for the files on the server.

= What happens to the data when I delete the plugin? =

Its tables and settings are removed.

== Changelog ==

= 1.0.0 =
* First release.
