What if External Image is removed?

Aldrin H. asked 2 years ago

Hi there, I get an broken image src when say an external image is removed from the affilate and the product I am promoting is not longer available. Is there a way to detect when the img src is 404 or no longer available to use a fallback image instead of a broken img src? Thank you

1 Answers
Dave Hilditch Staff answered 2 years ago

Hi – yes, this has been planned for a while but we have spent the last two months absorbing everything re: chatGPT.

I’ve pushed the card forward so it will get implemented sooner.

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

It’s not quite as simple as it sounds at first because if we simply use the onerror event then the first image takes a while to fail and then loads the fallback image.

I am planning to have the code message back to the server if an image fails to load so that from then on, the fallback image will be immediately loaded without overwriting what the original image URL was and then providing an area in the admin panel for admins to view broken images along with links to the posts containing them.

If you have an urgent need of this, here is some code you can use to implement the slow fallback images:

https://discord.com/channels/837258064704438282/880089157299499048/1111340183611252766

Your Answer


Super Speedy Plugins
Logo