I have a custom post type that requires different image sizes than other posts. Right now the images are added via wp_insert_attachment, a thumbnail set via set_post_thumbnail, and images are resized on the users end. I'd like to serve different sized images but wp_generate_attachment_metadata generates too many different sizes considering we're working with tens of thousands of photos. Is there a way to generate intermediate image sizes individually ie: create a medium size version of this image but not that one?
1 Answer
WordPress isn't natively friendly to such granular size management. Also it could take a considerable toll on humans to manage it, if manual.
The common approach is to switch image sizes generation from the moment of upload to the moment of size being requested. So the sizes which are never actually used are never generated accordingly.
If I am not mistaken WPThumb is one of popular implementations.