<ul>
<?php
$query_args = new WP_Query(
array(
'post_type' => 'attachment',
'posts_per_page' => -1,
)
);
if ( $query_args->have_posts() ) {
while ( $query_args->have_posts() ) : $query_args->the_post();
$query_args->the_post();
echo '<li>' . get_the_title() . '</li>';
endhwile;
}
?>
</uk>