Some times we need to get image url from post featured image to implement on code. I have created a little code from which you can use and solve your problem:
<?php if (has_post_thumbnail( $post->ID ) ): ?>
<?php $imageurl = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array(700,430,true,”) ); ?>
<div id=”custom-bg-image” style=”background-image: url(‘<?php echo $image[0]; ?>’)”>
</div>
<?php endif; ?>
Cheers! enjoy the code.