Default featured image set as background image [closed]

You can just use else below your code.

<?php 
if (has_post_thumbnail( $post->ID ) ):
    $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); 
else:
    $image = array( '/images/featured.jpg' ); 
endif;

$image_url = $image[0];
?>