› Moderator Notice ‹

This question exists as it fills a specific criterion and/or has historical significance. The current answers do not work for current WordPress versions. If you got a working solution, please add it as a new answer. If you got the exact same question, you could offer a bounty to attract working solutions.

When adding media to the post from Media Library, an iframe that opens in a popup has these tabs:

  1. From Computer
  2. From URL
  3. Media Library

From Computer is currently the default, but I almost never use it and switching to Media Library takes up about 3-4 seconds every time, I wonder if its possible somehow to make it the default instead?


1 Answer 1


There's a filter called media_upload_default_tab that you can use to do this.

add_filter('media_upload_default_tab', 'wpse74422_switch_tab');
function wpse74422_switch_tab($tab)
    return 'library';

You can set the to be whatever -- assuming the tab exists. The tab keys themselves are found in the functon media_upload_tabs.

 * Defines the default media upload tabs
 * @since 2.5.0
 * @return array default tabs
function media_upload_tabs() {
    $_default_tabs = array(
        'type' => __('From Computer'), // handler action suffix => tab text
        'type_url' => __('From URL'),
        'gallery' => __('Gallery'),
        'library' => __('Media Library')

    return apply_filters('media_upload_tabs', $_default_tabs);

So type (the original default), type_url, gallery, library and any custom tabs are up for grabs. Here is the above in plugin form.

One final note: the media work flow is changing significantly in WordPress 3.5 and this will no longer work. The good news, however, is that the new media popover is much more speedy and your problem is not likely to be an issue.

  • Awesome, thanks heaps, you just saved me ateast an hour each day! :D
    – Nimbuz
    Nov 30, 2012 at 5:23
  • 1
    This 'media_upload_default_tab' filter trick does work in 3.5, actually. But you are right, the workflow is different.
    – O. Jones
    Dec 15, 2012 at 0:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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