Is there any easy way to detect if an oEmbed URL is still returning any content? And, if so, is there a way to replace the missing oEmbed content with some kind of fallback content?
For instance, if I paste an instagram.com URL in my post, WordPress will recognize it and use oEmbed to inject Instagram's embed widget into the blog post. This provides a nice rich experience for visitors with a description, tags, a link to the person that posted the image on Instagram, etc.
However, as time goes by, there is an increasing chance that some users will remove their old images from Instagram. Once that happens, there won't be anything to embed and the blog post will no longer have an image at all. In such cases, I would like to be able to detect the (un)availability of oEmbed content and provide a graceful fallback, such as a locally stored image.
If anyone knows how to achieve this, some help would be highly appreciated.