Show all images attached to posts as a gallery page?

Create page template with this code :

$args = array(
            'post_type' => 'attachment',
            'posts_per_page' => -1
        );
$query = new WP_Query( $args);
if($query->have_posts()){ //check if found any attachment
    while($query->have_posts()){ //loop
        $query->the_post();
        //you can add your code here 
    }
}else{
// if found NO posts
}