I’ve got a wordpress site with a few custom post types. Each custom post type shows a list page, basically displaying a featured image and a title, and then you can click through to a detail page with a bunch more images.
I only need to resize uploaded “feature images”. If an uploaded image isn’t used as a feature image, I don’t need a thumbnail for it. Furthermore, each custom post type shows a different sized feature image.
So, what I want to do is say:
a) Only create thumbnails for feature images
b) Create certain sizes for certain post types, and not for others.
Is this possible? At the moment, EVERY uploaded image is getting 5 thumbnail sizes, and my wp-content directory is WAAAY bigger than it needs to be!
Thanks in advance.
Ok I found a solution using the intermediate_image_sizes filter hook. Place this code in your functions.php and replace the ‘post_type’ and ‘img_size_name’ with the names of your post and desired image size.
To avoid waste of space, the best solution is to use phpthumb (http://phpthumb.sourceforge.net/) inside your page templates.