# Your WooCommerce product images have disappeared

> A missing product image is almost never a WooCommerce bug: it’s a broken link between three things that need to stay in sync, the ID stored in the database, the actual file in wp-content/uploads, and the address WordPress looks for it at. Move any one of the three and the photo falls back to the default grey placeholder.

- Source canonique : [https://allaux.fr/en/wordpress-woocommerce/problemes/images-produits-disparues](https://allaux.fr/en/wordpress-woocommerce/problemes/images-produits-disparues)
- Langue : EN
- Dernière mise à jour : 2026-09-30

## Direct answer

> Open Media > Library: if the thumbnails are grey there too, the fault is the file or access to it, not the product page. Check that wp-content/uploads was transferred in full and is still readable. If the library looks fine, it is the product’s _thumbnail_id meta pointing at an attachment that no longer exists.

## How I go about it

1. **Scoping the problem** — I check whether a handful of products are affected or the whole media library, and whether it shows on the front end, the admin, or both.
2. **Checking the database ID** — I look at each affected product’s _thumbnail_id meta: if it points to a deleted attachment or one whose ID has changed, the image silently falls back to the default placeholder.
3. **Checking the registered domain** — After a migration or domain change, I check consistency between siteurl, home, and image URLs sometimes hard-coded in old content rather than stored as relative paths.
4. **Checking the actual files** — I check that wp-content/uploads was fully transferred, and that no file was corrupted by an image-optimisation plugin that stopped mid-process.
5. **Checking .htaccess and any CDN** — I check that no over-cautious security rule or CDN misconfiguration is blocking access to wp-content/uploads, which produces 404 errors while the database is entirely correct.

## What I handle regularly

- A grey placeholder instead of the photo on some product pages, even though the image existed before
- All images gone at once after a migration or an old backup restore
- Images showed correctly locally or on the old domain, but not on the new one
- The media library is empty or largely incomplete even though the site was working normally
- The image file returns a 404 error even though the product references it correctly in the database

## Where missing images come from

The link between a product and its photo is stored in postmeta under the _thumbnail_id key, a plain attachment ID. If that attachment was deleted, or its ID changed, which happens often after a migration or a restore from an old backup, the product falls back to the default placeholder with no error shown.

After a domain change, image URLs hard-coded into old content, rather than stored as relative paths, keep pointing at the old address: a mismatch between siteurl and home in the settings is a frequent cause of this.

The files themselves can also simply be missing from wp-content/uploads if a migration didn’t copy that folder, or corrupted if an image-optimisation plugin stopped mid-process. Finally, a misconfigured CDN or an over-cautious .htaccess security rule can 404 every single image while the database records stay perfectly correct.

## A handful of broken links, or the whole library

> A few isolated images are fixed directly in the database or the media library. Rebuilding an entire media library is a longer job, but it stays a migration task rather than proper development.

## Related pages

- **WordPress / WooCommerce migration** — Images are among the most common losses during a host or domain change. ([/wordpress-woocommerce/migration](/wordpress-woocommerce/migration))
- **Maintenance contract** — A regularly checked backup prevents this kind of loss after an incident. ([/services/maintenance](/services/maintenance))
- **All WooCommerce work I handle** — Other faults and features I handle on WooCommerce. ([/wordpress-woocommerce](/wordpress-woocommerce))

## FAQ

### Why did the images disappear when I didn’t touch anything?

It’s often an indirect consequence: an old backup restore, a migration that didn’t copy everything, or a host that changed a file path. The trigger isn’t always a deliberate action on the site.

### Am I going to lose my images for good?

Rarely. The file usually still exists on the server or in a backup; the problem is more often the link to that file than the file itself.

### Is this a CDN issue or a WordPress issue?

Both are possible: a misconfigured CDN blocks access without touching the database, while a broken attachment ID comes from WordPress itself. Diagnosis separates the two before any fix.

### Is this configuration, or do I need a developer?

Fixing a few broken links in the media library is within reach of a generalist. Diagnosing a database mismatch across a whole catalogue, or a misconfigured server rule, needs closer technical reading.
