I’m using the post thumbnails feature of WordPress and I have several sizes defined in functions.php. Everything’s fine, it works great with Crop Thumbnail to crop them perfectly.

I have a question though regarding the automatic cropping of all images I send to the server. I wish WordPress would only create cropped versions for the images used as post thumbnails. The pictures displayed inside articles should not be cropped, since they’re never used outside of the posts, and always at their full size.

Is there a way to do so ? I’d like to reduce the size of my content folder and I’m sure I could gain many bytes by disabling this automatic cropping of every pictures.

One more thing, related to this question : is there a way to delete all unused cropped images ? Over the years, I changed my theme many times and I have many old cropped versions that are unnecessary today. Is there an easy way to delete these ?

Thanks !

3 Answers
3

Look at this answer by Chip Bennet – Medium / Large images sizes aren’t cropped by default ( and I also just verified on my install ). You can change the cropping of Thumbnails in Settings -> Media. It sounds like what you really need is just a new image size via add_image_size() which is also described in his answer.

As far as removing unused images, right now you’re probably out of luck – you’ll need to go backwards and remove any unused images by hand ( maybe there’s a plugin out there, I’m not sure ). There a few ways to keep your WordPress clean, I prefer to delete associated media whenever a post is deleted. Charles Clarkson and t f have good answers for that. If you only want to target only the Featured Image you can look at these answers by sanchothefat and Ravs.

Really though it may be better to break you question into more specific questions to get more specific answers instead of grouping your 3 questions into one.

Leave a Reply

Your email address will not be published. Required fields are marked *