Wordpress - Get featured image URL by page id

Did you try anything? Its always helpful to share what you have tried.

$url = wp_get_attachment_url( get_post_thumbnail_id($post_id) );

Or if you want to get the image by image size.

$src = wp_get_attachment_image_src( get_post_thumbnail_id($post_id), 'thumbnail_size' );
$url = $src[0];

http://codex.wordpress.org/Function_Reference/get_post_thumbnail_id

http://codex.wordpress.org/Function_Reference/wp_get_attachment_url

http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src


As of Wordpress 4.4.0, we can use get_the_post_thumbnail_url():

$url = get_the_post_thumbnail_url( $post_id, 'thumbnail' );