get Image Id in foreach loop for CMB2 file_list type

I want to get Image Id in foreach loop which i have made with CMB2 file_list field type.The loop will show individual image Id for each image which i have upload in my single post, how to retrieve it. the code is below……

<?php $image_list = get_post_meta(get_the_ID(), ‘portfolio_image’, true); ?>

<?php foreach ($image_list as $image) { ?>

<div class=”col_half p-10″>
<a href=”#<?php echo wp_get_attachment_image( $image[‘id’], medium ); ?>” data-toggle=”tab”>
<img src=”<?php echo $image; ?>” class=”portfolio-thumb”/>
</a>
</div>

<?php } ?>

I want to get Image Id here…

<a href=”#<?php echo wp_get_attachment_image( $image[‘id’], medium ); ?>” data-toggle=”tab”>

Thanks for help….

Read more here:: get Image Id in foreach loop for CMB2 file_list type

Leave a Reply

Your email address will not be published. Required fields are marked *