How to See Which WooCommerce Product Uses an Image
Find the product that uses an image as its featured image, in a gallery or in a variation, by hand and with CICO Media Pro, before you replace or delete the file.
By CICO Media4 min read
On this page
A supplier sends a new photo and you want to replace the old file. Or you are cleaning up and one image looks unused. Before you touch it, you need to know which products use it. WooCommerce does not tell you. This article shows how to find out.
The short answer
WooCommerce saves product images as attachment IDs in the product meta. The Uploaded to column shows a product only if you uploaded the image from inside it. To find every product that uses an image, search the product meta for the image ID, or use a tool that keeps a usage index.
Where a product keeps its images
- Featured image. One ID, saved in the thumbnail meta of the product.
- Gallery. A list of IDs separated by commas, saved in a single meta value.
- Variations. Each variation is its own post, with its own thumbnail meta. It points to the product through its parent.
- Category images. Saved in the term meta of the category, not in a product.
- Descriptions. An image pasted into the long or short description is in the post content, as HTML.
How to find the products by hand
Back up first. You need the image ID: open the image in the Media Library. The address bar shows it as item=123 in the grid view, or as post=123 on the edit screen.
-
Search the product meta. Replace
wp_with your table prefix and123with the image ID.SELECT post_id, meta_key FROM wp_postmeta WHERE (meta_key = '_thumbnail_id' AND meta_value = '123') OR (meta_key = '_product_image_gallery' AND (meta_value = '123' OR meta_value LIKE '123,%' OR meta_value LIKE '%,123' OR meta_value LIKE '%,123,%'));The four
LIKElines make sure123does not match1234. -
Name the product. The
post_idcan be a product or a variation. Open it in the admin. For a variation, the parent is the product you want. -
Check the categories.
SELECT term_id FROM wp_termmeta WHERE meta_key = 'thumbnail_id' AND meta_value = '123'; -
Search the descriptions for the file name, without the size suffix, in Products.
How CICO Media Pro shortens the check
This is a Pro source. The free CICO Media reads post content, blocks and featured images, so an image used only in a WooCommerce product gallery or variation shows No usage there, and the Usage tab lists this source as active and not read. CICO Media Pro reads it.
CICO Media Pro reads the featured images and galleries of products and variations through the WooCommerce product API and keeps the result in its usage index. The image card shows Used · N. Open it and the Where used panel lists each product, with the source (WooCommerce) and a link to edit it.
The panel also shows the frontend status. An image on an active product is Live. If the product is not published, for example a draft or a private product, CICO can show Not live: the image is referenced, but visitors do not see it. We explain the three states in Used vs Visible.
You can also filter the library by source. Open the CICO Filters bar, choose WooCommerce in All sources, and see the images used by products.
Two things to keep in mind:
- Category images are not covered. Check them on the category screen.
- No usage found means nothing was found. It is not a promise that an image is safe to delete. CICO never deletes anything for you.
In the docs: what CICO Media detects in Integrations, and how Smart Filters narrow the library.
Summary
- WooCommerce saves product images as IDs in the product meta. The Media Library does not show the product.
- By hand: search the thumbnail and gallery meta for the ID, then name the product or its parent. Category images live in the term meta.
- CICO Media Pro lists the products that use an image, with the source and the frontend status.
- Back up first. The method for any source is in How to Find Where an Image Is Used in WordPress, and the difference between unattached and unused in Unattached vs Unused Media.
Frequently asked questions
How do I find which WooCommerce product uses an image?
Product images are saved as IDs in the product meta. The featured image is in the thumbnail meta, the gallery is a comma-separated list of IDs. Search the postmeta table for the image ID and open the products you find. A plugin that keeps a usage index can show the products directly.
Does the Uploaded to column show the product?
Only if you uploaded the image from inside that product. An image chosen later from the library stays unattached even when it is the main image of a product.
Where does WooCommerce store a variation image?
Each variation is its own post of type product variation, with the image ID in its own thumbnail meta. The variation points to its parent product.
What about product category images?
A category image is saved in the term meta of the category, not in a product. Check the category screen, or search the termmeta table for the image ID.
Does CICO Media Pro show WooCommerce products?
Yes. CICO Media Pro reads the featured images and galleries of products and variations through the WooCommerce product API, and Where used lists the product and the source. Category images are not part of that detection, so check them by hand.
Keep reading

Find image usage5 min read
How to Find Where an Image Is Used in WordPress
WordPress doesn't show where an image is used. Learn the manual ways to check, where they fall short, and how CICO Media shows it on every card, with Pro for builders and fields.

Find image usage3 min read
Unattached vs Unused Media in WordPress: They Are Not the Same
Unattached images are not always unused, and attached images are not always in use. Learn what the Uploaded to column really means and how to check safely.

Find image usage4 min read
How to Find Images Used in ACF Fields (Image, Gallery, Repeater)
An image used in an ACF field often shows as Unattached in the Media Library. Here is how to find it by hand, in post meta, and how CICO Media Pro lists it with the field name.