Retrieve image from Open Graph of an external URL and set as featured image

I would want to retrieve an image of an external link in the content of a post, as to feature it as a thumbnail, sort of how a Facebook status or other similar things would look. I guess that an Open Graph image is enough. There's already functions to capture the first link out of the content of a post (like one bundled on a core WP theme) or I could use a custom field just for it, but not sure about how to capture an image from within the URL itself. I'm aware of a WP function for attaching an image to a post given its specific URL (media_sideload_image), which may be useful.

Topic thumbnails open-graph Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.