I want to make it so that when an image is added to a post, full size is selected by default. It currently defaults to large.

I have tried:

function my_set_default_image_size () {
    return 'full';
add_filter( 'pre_option_image_default_size', 'my_set_default_image_size' );


add_filter('pre_option_image_default_size', function() { return 'full'; });

but neither are working for me.

I'm on WordPress 5.0.3, using the block editor.

  • are you using the classic editor or the block editor? – Tom J Nowell Feb 20 '19 at 15:38
  • @TomJNowell the block editor – ChristinaO Feb 21 '19 at 17:39

It doesn't look like that filter exists in WordPress core. That being said, I have the solution for you. That select uses an option to set the default size:

get_option( 'image_default_size', 'medium' );

So all you have to do is update that option:

update_option( 'image_default_size', 'full' );

For reference: media.php line 1296

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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