wordpress snippets last updated   : September 29, 2014
we now have 639 snippets

Remove unneeded images / thumbnail sizes

wordpress snippet

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,

snippet :  PHPcopy
    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 );
source →

Did you like this post? If so please share it with your friends. Thanks!

  • http://www.squareonemd.co.uk Elliott the web design guy

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

    • http://wpsnipp.com Kevin Chard

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

  • http://www.leachcreative.com/ Andrew Leach

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

  • Pingback: 25 WordPress Code Snippets for Enhanced Performance - ManageWP

jqsnipp.com | we just launched jquery snippets website