If you need quick access to the image dimensions from the Media Library, this will add a ‘Dimensions’ column
add_filter( 'manage_media_columns', 'add_media_columns');
function add_media_columns( $columns ) {
$columns['dimensions'] = 'Dimensions';
return $columns;
}
add_action( 'manage_media_custom_column', 'fill_media_columns', 10, 2 );
function fill_media_columns( $column_name, $id ) {
switch ( $column_name ) {
case 'dimensions' :
$meta = wp_get_attachment_metadata( $id );
if ( isset( $meta['width'] ) ) {
echo $meta['width'].' x '.$meta['height'];
}
break;
}
}
Don’t forget to prefix these to avoid clashes with other code!