Remove Image Sizes in Media Settings Page

Note: you shouldn’t remove any of the default images since they’re all highly used throughout the WordPress admin. For example, on the media library page all those image blocks are technically “medium” sized images scaled down. If you click an image it will display the “large” image if possible. Otherwise, these default to show a scaled down “Full” image which can really slow down the media library and the process of choosing / editing images in the post editor.

TL;DR Removing default image sizes could have adverse effects and slow down certain areas.


WordPress makes these static so there’s no easy way to actually remove these fields, they’re hardcoded into the table. The next best thing we can do is hide them using CSS which I’ll show below. The following code can be placed in a functions.php file:

/**
 * Custom Admin Styles
 *
 * @return void
 */
function wpse279908_admin_print_styles() {

    $screen = get_current_screen();

    // Media Options Page Only
    if( 'options-media' !== $screen->id ) {
        return;
    }

  ?>

    <style>
        #wpbody-content form > table:first-of-type tr:nth-of-type( 2 ),
        #wpbody-content form > table:first-of-type tr:nth-of-type( 3 )  {display: none;}
    </style>

  <?php

}
add_action( 'admin_print_styles', 'wpse279908_admin_print_styles' );