Replace image scr with it’s surrounding href

Use this for example in the loop

$new_url="<img src="http://www.google.nl";
$content = apply_filters('the_content', get_the_content());
$content = preg_replace("/(<img[^>]*src *= *[\"']?)([^\"']*)/i", $new_url,  $content);