Using plugin Lightbox Photoswipe:
https://wordpress.org/plugins/lightbox-photoswipe/
add_action( 'genesis_after_header', 'wpsites_after_header' );
function wpsites_after_header() {
if(is_front_page()){
$type = 'home_images';
$args = array(
'post_type' => $type,
'post_status' => 'publish',
'posts_per_page' => -1,
);
$query = new WP_Query( $args );
$ids=array();
if (have_posts()) :
// Start the loop.
while ( $query->have_posts() ) : $query->the_post();
if ( has_post_thumbnail() ) {
$featuredID = get_post_thumbnail_id();
$ids[]=$featuredID;
}
// End the loop.
endwhile;
$list = implode(', ', $ids);
echo do_shortcode('[gallery link="file" size="large" columns="4" ids="'.$list.'"]');
endif;
}
}