WordPress.org

Ready to get started?Download WordPress

Forums

thumbnail size in default template (3 posts)

  1. anchorman
    Member
    Posted 6 years ago #

    I am modifying the default template and wish to adjust the size of generated image thumbnails, but cannot locate the parameters. Can someone point me to the relevant module?

    Thanks

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    Add this to the functions.php file for your theme:

    function custom_thumbnail_size() {
    return 128; // or whatever you want
    }
    add_filter('wp_thumbnail_max_side_length','custom_thumbnail_size');

    The "128" is the default size, and it will be the length of the "long" side of your thumbnail. Change it to whatever number you want.

  3. depatty
    Member
    Posted 6 years ago #

    Thanks, that works great!

    Dave

Topic Closed

This topic has been closed to new replies.

About this Topic