Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 552479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:30:15+00:00 2026-05-13T11:30:15+00:00

Is there any way in WordPress to prevent content editors from selecting the Full

  • 0

Is there any way in WordPress to prevent content editors from selecting the “Full size” option when uploading images to a post? I’d like them to just have the “thumbnail”, “medium”, and “large” options. I used to use the Scissors plugin to do this, but as of WordPress 2.9 this plugin no longer works.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:30:15+00:00Added an answer on May 13, 2026 at 11:30 am

    You could acheive this result by forcing WordPress not to display the full size option. The function that creates the size radio buttons is in wp-admin/includes/media.php and is called image_size_input_fields.

    There’s no filter or action hook for that function that I’m aware of, but the function that calls it (image_attachment_fields_to_edit) has a filter hook of attachment_fields_to_edit.

    So basically we can use the filter hook to override those two functions with our own, which will only be very slightly modified.

    This will work in the standard functions.php file, or I suppose you could incorporate it into a plugin.

    First, add the new filter:

    add_filter('attachment_fields_to_edit', 'MY_image_attachment_fields_to_edit', 11, 2);
    

    Next we create our two functions. I’ve just prefixed the names with MY_ for this case:

    function MY_image_attachment_fields_to_edit($form_fields, $post) {
     if ( substr($post->post_mime_type, 0, 5) == 'image' ) {
      $alt = get_post_meta($post->ID, '_wp_attachment_image_alt', true);
      if ( empty($alt) )
       $alt = '';
    
      $form_fields['post_title']['required'] = true;
    
      $form_fields['image_alt'] = array(
       'value' => $alt,
       'label' => __('Alternate text'),
       'helps' => __('Alt text for the image, e.g. “The Mona Lisa”')
      );
      
      $form_fields['align'] = array(
       'label' => __('Alignment'),
       'input' => 'html',
       'html'  => image_align_input_fields($post, get_option('image_default_align')),
      );
    
      $form_fields['image-size'] = MY_image_size_input_fields( $post, get_option('image_default_size', 'medium') );
    
    
     } else {
      unset( $form_fields['image_alt'] );
     }
     
     return $form_fields;
    }
    

    The only thing that’s changed here from the normal WordPress function is that we’re calling MY_image_size_input_fields instead of image_size_input_fields.

    Now the function that does the actual hiding:

    function MY_image_size_input_fields( $post, $check = '' ) {
    
      // get a list of the actual pixel dimensions of each possible intermediate version of this image
      /* $size_names = array('thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'full' => __('Full size')); */
      $size_names = array('thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'));
    
      if ( empty($check) )
       $check = get_user_setting('imgsize', 'medium');
       
       echo '<pre>'; print_r($check); echo '</pre>';
       
    
      foreach ( $size_names as $size => $label ) {
       
       $downsize = image_downsize($post->ID, $size);
       $checked = '';
    
       // is this size selectable?
       $enabled = ( $downsize[3] || 'large' == $size );
       $css_id = "image-size-{$size}-{$post->ID}";
       // if this size is the default but that's not available, don't select it
       if ( $size == $check ) {
        if ( $enabled )
         $checked = " checked='checked'";
        else
         $check = '';
       } elseif ( !$check && $enabled && 'thumbnail' != $size ) {
        // if $check is not enabled, default to the first available size that's bigger than a thumbnail
        $check = $size;
        $checked = " checked='checked'";
       }
    
       $html = "<div class='image-size-item'><input type='radio' " . ( $enabled ? '' : "disabled='disabled' " ) . "name='attachments[$post->ID][image-size]' id='{$css_id}' value='{$size}'$checked />";
    
       $html .= "<label for='{$css_id}'>$label</label>";
       // only show the dimensions if that choice is available
       if ( $enabled )
        $html .= " <label for='{$css_id}' class='help'>" . sprintf( __("(%d&nbsp;&times;&nbsp;%d)"), $downsize[1], $downsize[2] ). "</label>";
    
       $html .= '</div>';
    
       $out[] = $html;
       
      }
    
      return array(
       'label' => __('Size'),
       'input' => 'html',
       'html'  => join("\n", $out),
      );
    }
    

    In this last function only two things change. At the top we get rid of the reference to ‘Full Size’ in the $size_names array definition. Then the line that says $enabled = ( $downsize[3] || 'large' == $size );, we changed. We simply replaced 'full' == $size with 'large' == $size.

    Here’s a screenshot of the result:
    alt text

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to capture the MouseDown even from the .NET 2.0 TextBox
Is there any way to group/folder my pages in Wordpress. Pages as in pages,
Is there any way we can have two different Permalinks in a Wordpress blog?
Is there any way to individually style each part of the date that wordpress
Is there any way to create forms for a particular content type and submit
Is there any way to check whether a file is locked without using a
Is there any way to apply an attribute to a model file in ASP.NET
Is there any way, in any language, to hook my program when a user
Is there any way to have something that looks just like a file on
Is there any way to include the SVN repository revision number in the version

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.