How to get first image from post

Most WordPress users are using custom fields to display thumbs on their blog homepage. It is a good idea, but do you know that with a simple php function, you can grab the first image from the post, and display it.

to get you first image from the post just paste the below code in functions.php :