admin管理员组

文章数量:1315377

When a user adds media to the WYSIWYG, is there a way to set the default image size to large?

It defaults to medium, I'd like this to be "large" without the user having to change the value.

When a user adds media to the WYSIWYG, is there a way to set the default image size to large?

It defaults to medium, I'd like this to be "large" without the user having to change the value.

Share Improve this question asked May 17, 2016 at 14:27 Ben EverardBen Everard 1,2885 gold badges19 silver badges34 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 11

If you add this to functions.php, this will update the options as set.

function custom_image_size() {
    // Set default values for the upload media box
    update_option('image_default_align', 'center' );
    update_option('image_default_size', 'large' );

}
add_action('after_setup_theme', 'custom_image_size');

You can update the options as you need.

本文标签: mediaHow to set the default embed image size