I need featured images with 3 different sizes, which I have working with this code:
add_theme_support( 'post-thumbnails' );
add_image_size( 'thumb1', 700, 300, false );
add_image_size( 'thumb2', 300, 100, false );
add_image_size( 'thumb3', 60, 60, true );
But I need these 3 sizes to only apply to featured images, not to images placed in the content of the post.
The above code creates 3 unused thumbnails for each image in the post and is filling up my server!
How do I code this so that the thumbnails are only applied to featured images?
This is an old question, but in case anyone comes up against this again you’d do it with WordPress hooks.
Something like https://github.com/crstauf/WordPress-FeaturedImage-SpecialImageSize/blob/master/functions.php would work.