0

I'm developing my own theme. I'm trying to remove the default WordPress image sizes medium, large and full. I also want my own image size, vividflow-full-width. I'm using this Sumtips tutorial.

At the after_setup_theme, this is runt:

add_image_size( 'vividflow-full-width', 682, 9999, true );

And at the image_size_names_choose action hook:

unset( $sizes['medium']);
unset( $sizes['large']);
unset( $sizes['full'] );

$myimgsizes = array(
    "vividflow-full-width" => __( "Full width" )
);

return array_merge($sizes, $myimgsizes);

However, at the insert media screen, I only see the option to insert a thumbnail. What's going wrong?

I'm sure the functions both codes are in are runt. I don't see any errors in my error log, nor get I any notices when setting WP_DEBUG.

  • Are you unsetting 'small' also? If so, read the final comment of the tutorial. – vancoder Feb 28 '13 at 22:04
  • No, $sizes isn't empty, I don't remove the thumbnail. – Keelan Mar 1 '13 at 5:53
1

Your custom size will only show up as an option if the selected image exists at those dimensions. So, have you uploaded any images since adding the new image size to functions.php? If not, then you won't see the vividflow option.

You could always run regenerate thumbnails so bring your older images up to date.

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.