WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i'm trying to add image size in media library screen so will be simply to handle images. Anyone does it before me? Any help appreciated. Francesco

share|improve this question
Codex: add_image_size(); – kaiser Oct 12 '11 at 19:59
Investigating this Q&A, I ended up assembling a two sortable columns solution (width & height). I posted it in this other question because there the sortable functionality is being asked... But @Rarst answer and link got me started in the first place. – brasofilo Jun 5 '12 at 14:41

Code based on Custom Sortable Columns

add_filter('manage_upload_columns', 'size_column_register');

function size_column_register($columns) {

    $columns['dimensions'] = 'Dimensions';

    return $columns;

add_action('manage_media_custom_column', 'size_column_display', 10, 2);

function size_column_display($column_name, $post_id) {

    if( 'dimensions' != $column_name || !wp_attachment_is_image($post_id))

    list($url, $width, $height) = wp_get_attachment_image_src($post_id, 'full');

    echo esc_html("{$width}×{$height}");
share|improve this answer
thank you very much. work like a charm. – Francesco Di Candia Oct 13 '11 at 9:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.