// Show image dimensions in media library overview
function wh_column( $cols ) {
$cols["dimensions"] = "Dimensions (w, h)";
return $cols;
}
add_filter( 'manage_media_columns', 'wh_column' );
function wh_value( $column_name, $id ) {
if ( $column_name == "dimensions" ):
$meta = wp_get_attachment_metadata($id);
if(isset($meta['width']))
echo $meta['width'].' x '.$meta['height'];
endif;
}
add_action( 'manage_media_custom_column', 'wh_value', 11, 3 );
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter