xxxxxxxxxx
<?php echo get_post_meta(attachment_url_to_postid($thumb), '_wp_attachment_image_alt', true); ?>
Example :
<img src="<?php print esc_html($thumb); ?>" class="img-fluid"
alt="<?php echo get_post_meta(attachment_url_to_postid($thumb), '_wp_attachment_image_alt', true); ?>">
xxxxxxxxxx
<?php echo get_post_meta(attachment_url_to_postid($thumb), '_wp_attachment_image_alt', true); ?>
Example :
<img src="<?php print esc_html($thumb); ?>" class="img-fluid"
alt="<?php echo get_post_meta(attachment_url_to_postid($thumb), '_wp_attachment_image_alt', true); ?>">