Why a repeated gallery image holds the product back
The gallery is where a shopper looks for the angle the featured photo did not show: the back, the label, the item in use. Every slot that repeats a photo they have already seen is a slot that does not answer a question — and on a phone, where thumbnails are scarce, it pushes a real angle out of view.
- It looks like a mistake. Two identical thumbnails in a row are the visual equivalent of a typo in the title; the shopper notices, and trust drops a notch before they read the price.
-
The featured image counts twice. WooCommerce
already puts the featured image first on the product page. When
the same attachment also sits in
_product_image_gallery, most themes render it a second time as the very next slide. - Imports multiply it. CSV imports and feed syncs often append gallery IDs instead of replacing them, so one repeat after the first import becomes three after the third.
- Feeds and lightboxes carry it along. The repeated attachment goes out in product feeds and shows up as a duplicate frame in every zoom and slider that reads the gallery.
How to find repeated gallery images manually
The gallery is stored as a comma-separated list of attachment IDs in
_product_image_gallery, and the featured image as a single
ID in _thumbnail_id. The most common repeat — the featured
image also listed in the gallery — is one WP-CLI query away:
wp db query "SELECT p.ID, p.post_title, t.meta_value AS thumbnail_id, g.meta_value AS gallery FROM wp_posts p JOIN wp_postmeta t ON t.post_id = p.ID AND t.meta_key = '_thumbnail_id' JOIN wp_postmeta g ON g.post_id = p.ID AND g.meta_key = '_product_image_gallery' WHERE p.post_type = 'product' AND p.post_status = 'publish' AND FIND_IN_SET(t.meta_value, g.meta_value) > 0 ORDER BY p.ID;"
Adjust the table prefix if yours isn't wp_. Variations
store their own _thumbnail_id under
post_type = 'product_variation'.
The other case — the same ID appearing twice inside the gallery list itself — is awkward in plain SQL, because the list is one string. You end up exporting the meta and checking each list in a script, or opening products one by one. And either way the answer is a snapshot: the next import that appends gallery IDs recreates the repeat, and nobody is watching for it.
How CatalogLift finds and fixes it
Every scan looks at the synced media assignments of each current product, both the featured image and the gallery, and groups them by attachment. A product is flagged when one attachment is assigned to it more than once and at least one of those assignments is in the gallery. A featured image with no gallery copy is fine; two visually similar but separate files are not the same attachment and are not flagged. Each finding is raised at medium severity and carries the attachment, its URL, how many times it is used, and the role and position of each use as evidence.
There is no AI on this check — the fix is a deterministic edit to the gallery. CatalogLift computes the gallery without the repeat: a regular gallery image keeps its first copy, and a featured image loses every gallery copy because it already leads the page. You see the before and after list of attachments in CatalogLift and approve. Nothing is written before that decision; on it, the gallery goes to WooCommerce, and if the gallery changed in the meantime the apply refuses rather than overwriting it. The next scan verifies the repeat is gone, and because CatalogLift keeps watching, an import that appends the same IDs again becomes a fresh finding instead of a quiet regression.