Curious if anyone does. I wrote a little piece of code that will let you just post image urls in your post box (similar to the way you can do automatica youtube embeds)
add this to your functions.php file
or you can download the plugin version https://github.com/chrismccoy/imgur
add this to your functions.php file
Code:
wp_embed_register_handler('imgur', '#https?://(.+\.)?imgur\.com/.*#i', 'wp_imgur_embed_handler');
function wp_imgur_embed_handler( $matches, $attr, $url, $rawattr ) {
$embed = sprintf('<img src="%1$s" />',$url);
$embed = apply_filters( 'oembed_imgur', $embed, $matches, $attr, $url, $rawattr );
return apply_filters( 'oembed_imgur', $embed, $url, '' );
}


Comment