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

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

share|improve this question
up vote 10 down vote accepted

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 );
share|improve this answer
Great, thanks :) I was looking all all over the options... – fischi Dec 14 '12 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 '12 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. – toscho Dec 31 '12 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.

share|improve this answer

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.