The following function is used to get first image URL from WordPress post. Paste below function on /wp-includes/functions.php file. Now you can show the image using this syntax: