after updating to WordPress 3.5 my automatic embeds are limited to a width of 500px, and the settings for this size have been removed with WordPress 3.5

Also, I can't find the Values in the wp_options table.

Does anyone know how to change them again?

Cheers, fischi

2 Answers 2


See the function wp_embed_defaults() in wp-includes/media.php:

function wp_embed_defaults() {
    if ( ! empty( $GLOBALS['content_width'] ) )
        $width = (int) $GLOBALS['content_width'];

    if ( empty( $width ) )
        $width = 500;

    $height = min( ceil( $width * 1.5 ), 1000 );

    return apply_filters( 'embed_defaults', compact( 'width', 'height' ) );

To change these values filter embed_defaults:

add_filter( 'embed_defaults', 'wpse_76102_new_embed_size' );

function wpse_76102_new_embed_size()
    // adjust these pixel values to your needs
    return array( 'width' => 1000, 'height' => 600 );
  • Great, thanks :) I was looking all all over the options...
    – fischi
    Dec 14, 2012 at 10:41
  • @toscho Do you remember how this was made in v3.4.2? I am asking this as I adjusted my embed size somehow on the previous version and I cannot find any trace of it in my functions/plugin so I am thinking that maybe I edited the core files. I am asking this because I want to remove whichever edit that I did in case it was not the core files. Nonetheless, this is a great answer.
    – Christine Cooper
    Dec 31, 2012 at 16:49
  • @ChristineCooper It was the option embed_size_w. So a filter on pre_get_option_embed_size_w should be a good candidate.
    – fuxia
    Dec 31, 2012 at 16:52

This worked for me from http://www.wpbeginner.com/wp-themes/how-to-set-oembed-max-width-in-wordpress-3-5-with-content_width/

Add the below to functions.php

if ( ! isset( $content_width ) ) $content_width = 600;

Then had to go in and re-save the post to make it work.

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.