Your code is right just need to change $atts variable.
// if you want to add image, alt attribute on shortcode statically
$atts = shortcode_atts(
array(
'image_src' => '',
'alt' => '',
'add_img_class' => '',
'id' => ''
), $atts, 'hero-banner'
);
// if you pass image and alt attribute dynamically
$atts = shortcode_atts(
array(
'image_src' => 'dynamic data',
'alt' => 'dynamic data',
'add_img_class' => '',
'id' => ''
), $atts, 'hero-banner'
);
It’s used when we are using content with closing dynamic parameter.Please find below example
function wrap_content_shortcode_callback($atts, $content, $tag){
$output="<span style="font-size: 120%;">" . $content . '</span>';
return $output;
}
add_shortcode('wrap_shortcode','wrap_content_shortcode_callback');
//use shortcode like this: [wrap_shortcode]test123[/wrap_shortcode]