How to change the image size in new Media Uploader (ie use medium vs thumbnail)

Is it possible to change the image size of the thumbnails in the new media uploader?

For example images are currently displayed using the “thumbnail” image crop size and I would like them to be the “medium” image crop size.

Related posts

Leave a Reply

2 comments

  1. Supposing that I’m interpreting your Question correctly

    The thumbnails displayed in the new Media Uploader are already the medium sized ones, being constrained on the fly.

    media uploader inspector

    So, it’s a matter of applying some CSS styling to increase their size. Maybe other style adjustments are necessary, this is just a proof of concept.

    add_action( 'admin_head-post-new.php', 'style_thumbnails_wpse_81677' );
    add_action( 'admin_head-post.php', 'style_thumbnails_wpse_81677' );
    
    function style_thumbnails_wpse_81677()
    {
        $thumb_width  = get_option( 'medium_size_w' );
        $thumb_height = get_option( 'medium_size_h' );
    
        echo "
        <style type='text/css'>
            .details.attachment, .attachement, .attachment.save-ready {
                width:{$thumb_width}px !important;
            }
            .attachment-preview, .attachment-preview .thumbnail {
                width: {$thumb_width}px !important;
                height: {$thumb_height}px !important;
            }
            .portrait .thumbnail img, .landscape .thumbnail img {
                max-width: {$thumb_width}px !important;
                max-height: {$thumb_height}px !important;
            }
        </style>
        ";
    }
    

    Result:

    bigger thumbs in new media uploader

  2. //wp-admin.css
    
    .media-item .pinkynail {
      float: left;
      margin: 2px 2px 0;
      max-width: 200px;
      max-height: 200px;
    }
    

    change max width and height to the size you want