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.

  • What do you mean by "from within URL" exactly? If it happens in context of your own site why do you need to extract the data from Open Graph? Please explain a bit what precisely you are trying to do. – Rarst Mar 1 '14 at 22:16
  • Sorry, I meant to say from an external URL. I edited the post to reflect that. – peroyomas Mar 1 '14 at 22:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.