Support » Fixing WordPress » How to remove custom media sizes?

  • It’s somewhat well-known how to add custom media sizes by using:
    add_image_size( HANDLE, WIDTH, HEIGHT, CROP );

    But, how to remove them? I’ve added a “tiny” 50×50 size and now my post-thumbnail-meta-box uses it to show the thumbnail. I only could override this by setting default thumbnail again with:
    set_post_thumbnail_size(get_option('thumbnail_size_w'), get_option('thumbnail_size_h'), get_option('thumbnail_crop'));

    Can somebody help me?

Viewing 2 replies - 1 through 2 (of 2 total)
  • With WordPress 3.0 out, are there any news on this subject?



    Forum Moderator

    I can’t find anything to specifically remove custom images sizes but you could try pulling them out of the $_wp_additional_image_sizes array :


    function add_image_size( $name, $width = 0, $height = 0, $crop = FALSE ) {
    	global $_wp_additional_image_sizes;
    	$_wp_additional_image_sizes[$name] = array( 'width' => absint( $width ), 'height' => absint( $height ), 'crop' => !!$crop );

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to remove custom media sizes?’ is closed to new replies.