Is there a function to list all uploaded images? How can I add one?

uploaded files are stored as attachment post type in WordPress. Use get_posts() and query for all attachments:

$args = array(
    'post_type' => 'attachment',
    'numberposts' => -1,
    'post_status' => null,
    'post_parent' => null ); 
$all_attachments = get_posts( $args );

EDIT – you can also set post_mime_type in get_posts to get all of type ‘image/jpeg’ for example.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)