# "Uploaded By" Column in the Media Library

> Adds a column to the Media Library list view showing who uploaded each file, with a link to see everything that person uploaded.

- Type: PHP
- Runs: Admin only
- Category: [Media](https://wpide.com/library/category/media/)
- Tags: media-library, columns, authors
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/uploaded-by-column-in-media/

## Code

```php
add_filter( 'manage_upload_columns', function ( $columns ) {
    $columns['wpide_uploader'] = 'Uploaded by';

    return $columns;
} );

add_action( 'manage_media_custom_column', function ( $column, $attachment_id ) {
    if ( 'wpide_uploader' !== $column ) {
        return;
    }

    $author = get_userdata( (int) get_post_field( 'post_author', $attachment_id ) );

    if ( ! $author ) {
        echo '&mdash;';
        return;
    }

    echo '<a href="' . esc_url( add_query_arg( array( 'mode' => 'list', 'author' => $author->ID ), admin_url( 'upload.php' ) ) ) . '">' . esc_html( $author->display_name ) . '</a>';
}, 10, 2 );
```

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find ""Uploaded By" Column in the Media Library" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
