X

Remove unneeded images / thumbnail sizes

Adding some or all of these lines of code to the functions.php of your wordpress theme will effectively remove some of the default images sizes that may be unneeded. Make sure to include both the _w _h for width and height,



Code Snippet:


update_option( 'thumbnail_size_h', 0 );
update_option( 'thumbnail_size_w', 0 );
update_option( 'medium_size_h', 0 );
update_option( 'medium_size_w', 0 );
update_option( 'large_size_h', 0 );
update_option( 'large_size_w', 0 );

Comments  Leave a Reply

  1. 25 WordPress Code Snippets for Enhanced Performance - ManageWP May 27, 2014 at 11:42 am

    […] Source […]

  2. Andrew Leach May 7, 2012 at 6:23 pm

    Sounds like this is a good way of saving space on your server.  Thanks for sharing.

  3. Elliott the web design guy May 4, 2012 at 7:13 pm

    eh? this does what exactly? Does this mean no need for thumbnail regen?

    1.  Hi Elliott no this simply removes the default image sizes from being created.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!