Skip to content
WP Intense Q & ACategory: External ImagesPerform a check to see if an external image URL is a 404
. asked 2 months ago

As the title says. If datafeedr has products where the image url leads to a 404 page, is there a way to detect this on import and assign the standard woocommerce placeholder in its place

1 Answers
Dave Hilditch Staff answered 2 months ago

This should be happening already in External Images.

  1. Check if the post/product has an external image, if so, display it
  2. Else, use the normal code which will grab uploaded images if they are there
  3. If no uploaded image, it runs the woo placeholder
  4. Inside the placeholder hooks, I do recheck if there is an external image – this is backwards compatibility code for our older users.

What are you actually seeing?

Ah – I think I understand now – you are saying at step 1 – there IS an image URL but the image URL fails and produces a 404.

I will add an option to the External Images page for a fallback image placeholder and then in there you can add the Woo placeholder image.

I’ve created a feature request for this here:

https://trello.com/c/vytWzBOb/161-add-image-fallback-option-for-when-external-image-404s

Your Answer


Join our Discord community and read the rules for a 20% discount coupon.