Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WordPress - Disable image full size option

Is there any way in Wordpress to prevent content editors from selecting the "Full size" option when inserting images to a post? I've already tried Wordpress Prevent Users from posting full size image uploads but one this doesn't seem to be working (last active in 2010).

like image 268
jmeinlschmidt Avatar asked Jun 07 '26 04:06

jmeinlschmidt


1 Answers

Incase you don't want hardcoded sizes, try this in your functions.php:

add_filter('image_size_names_choose', function($sizes)
{
    unset($sizes['full']);
    return $sizes;
});

References:

  • image_size_input_field()
  • media-template.php#L934
like image 132
dan9vu Avatar answered Jun 08 '26 16:06

dan9vu