Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

You ever notice Google News has relevant images associated with its headlines?

How can I use WordPress to extract a featured image from an external webpage referenced in a blog post (or custom field)?

I'm open to any suggestions. I've seen this kind of functionality on a lot of web sites. There must be a way to do this with WP.

share|improve this question
    
I'm not seeing anytning that addresses my question; If you do, could you post a link? –  Richard May 16 '12 at 23:46
    
Have you found a solution for this one? –  brasofilo Nov 27 '12 at 17:38

1 Answer 1

Found some plugins that may (or not) match your requirements. Using this query string in the repository.

But, there's one (WP-SnapAvatar) that although doesn't address the particulars, consists in a little and very interesting function, that I'll reproduce here:

/*
Plugin Name: WP-SnapAvatar
Version: 1.0
Plugin URI: http://darkx-studios.com/
Description: This plugin puts the commentor's website screenshot where there is no gravatar.
Author: Neacsu Alexandru
Author URI: http://darkx-studios.com
Copyright (c) 2008
Released under the GPL license
http://www.gnu.org/licenses/gpl.txt
*/

function site_avatar_hook($baseCode) {
    $AutorUrl = get_comment_author_url();
    $PictureLink = "http://images.websnapr.com/?url=$AutorUrl";

    preg_match('@http://[^"\']+["\']@',$baseCode,$newSrc);
    $newSrc = $newSrc[0];

    if(trim($AutorUrl)){
        $httpSrc = substr($newSrc,0,strlen($newSrc) - 1) . "&nocatch=" . rand(10,100) ."&default=" . $PictureLink;
        $newAvatar=preg_replace('@src=(["\'])http://[^"\']+["\']@',"src='" . $httpSrc . "'",$baseCode);
    } else {
        $newAvatar = $baseCode; 
    }
    echo $newAvatar;
}

add_filter('get_avatar','site_avatar_hook',5,4);

For what you ask, I think that a combination of WP-SnapAvatar and this other one (Link Indication) would do the job.

But, I won't get into that otherwise I end up writing a new plugin :)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.