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.
How I go about it
-
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.
-
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.
-
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.
-
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.
-
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.