I would like to know if there is a simple way (custom code or plugin) to create thumbnail sizes only for images that I intend to use as featured images (index.php, archive.php, etc.) , but not for the images used in the posts (single.php). My main goal is reduce server space usage by not creating thumbnails that my theme will never use.
My thumbnails would actually only have two sizes, 720px wide and 328px wide, and the 720px wide featured images (homepage only) would also have a 328px wide one (for archive.php and sidebar.php)
Currently, the only programmatic way I know is to generate thumbnails for every image upload, which is undesirable, since most of my uploads will be post images and I would have to deleted a lot of images from the server manually.
I would prefer custom code over plugins, but a plugin would be acceptable. I know there are some image resizing plugins out there, but they haven’t been update in a longtime (TimThumb, Dynamic Image Resizer).
I have also found a similar question here on WordPress SE, but the accepted answer doesn’t really solve my problem.
EDIT: I need to delete or prevent thumbnails for images inside the post, not for featured images, i.e.:
(1) Featured image: additional thumbnails auto-generated by WP are OK.
(2) Images used inside the posts: Upload the original image and do not generate any additional sizes. I will crop, resize and optimize the image before uploading it and one size will fit my needs.