# Thumbnail Column From an ACF Image Field

> Shows a small preview of an ACF image field in a post type's admin list, handy for logos, headshots or product photos that are not the featured image.

- Type: PHP
- Runs: Admin only
- Category: [Custom Post Types & Fields](https://wpide.com/library/category/post-types/)
- Tags: acf, admin, images
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/acf-image-admin-column/

## Code

```php
// Post type and image field name.
$wpide_acf_img_type  = 'post';
$wpide_acf_img_field = 'logo';

add_filter( "manage_{$wpide_acf_img_type}_posts_columns", function ( $columns ) {
    return array_slice( $columns, 0, 1, true ) + array( 'acf_thumb' => '<span class="screen-reader-text">Image</span>' ) + array_slice( $columns, 1, null, true );
} );

add_action( "manage_{$wpide_acf_img_type}_posts_custom_column", function ( $column, $post_id ) use ( $wpide_acf_img_field ) {
    if ( 'acf_thumb' !== $column || ! function_exists( 'get_field' ) ) {
        return;
    }

    $value = get_field( $wpide_acf_img_field, $post_id, false );
    $id    = is_array( $value ) ? (int) ( $value['ID'] ?? 0 ) : absint( $value );

    echo $id ? wp_get_attachment_image( $id, array( 48, 48 ), false, array( 'style' => 'width:48px;height:48px;object-fit:cover;border-radius:4px' ) ) : '';
}, 10, 2 );

add_action( 'admin_head', function () use ( $wpide_acf_img_type ) {
    $screen = get_current_screen();

    if ( $screen && 'edit-' . $wpide_acf_img_type === $screen->id ) {
        echo '<style>.column-acf_thumb{width:56px}</style>';
    }
} );
```

## Notes

Set the post type and the image field name.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Thumbnail Column From an ACF Image Field" 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/
