I want to remove "thumbnail", "medium_large" and "original" sizes. I wrote this in functions.php
if (function_exists('add_theme_support')) {
// Add Menu Support
add_theme_support('menus');
// Add Thumbnail Theme Support
add_theme_support('post-thumbnails');
//add_image_size('large', 700, '', true); // Large Thumbnail
//add_image_size('medium', 250, '', true); // Medium Thumbnail
//add_image_size('small', 120, '', true); // Small Thumbnail
//add_image_size('custom-size', 700, 200, true); // Custom
remove_image_size('medium_large');
remove_image_size('thumbnail');
remove_image_size('original');
// Enables post and comment RSS feed links to head
add_theme_support('automatic-feed-links');
}
I added some context and the commented add_image_size
functions to show that this code is accessible and that previously those functions worked, creating additional thumbnail sizes.
But now, this exact code is not removing the desired image sizes. When I upload an image, the system creates exactly 5 images:
- Original: 1920x1080
- medium_large: 768x432
- large: 570x321 (because redefined in Options > Media to 570x570)
- medium: 350x197 (because redefined in Options > Media to 350x350)
- thumbnail: 150x150
This is absolutely coherent with the fact that all remove_image_size
answer with false
, so something isn't working.
Why remove_image_size
is not working? Thank you.
PS: I'm using Wordpress 4.7.3