Visual Composer Grid Builder: add wp_get_attachment_url for features images

Hi all -

I have successfully implemented a shortcode to get the featured image url of the post.

add_shortcode(‘tbn_link’, ‘tbn_link_content’);
function tbn_link_content($atts) {
global $post;
$thumbnail_id = get_post_thumbnail_id($post->ID);
return wp_get_attachment_url($thumbnail_id);

Now I try to adapt the same to the grid builder for the Masonry Image Gallery. In the grid builder the image is set as featured image. How can I get the ID of every image in that grid to display the url?