Available for projects & agency overflow · Quick reply, from the person who does the work

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.

Describe my issue Send a message

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.

Related pages

Describe your need in one minute

A few targeted questions so I can reply with an estimate rather than another questionnaire.

besoin
etat
constructeur (facultatif)
extensions (facultatif)
Please provide an email or a phone number so I can get back to you.

Please provide an email or a phone number so I can get back to you.

Frequently asked questions

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.