Sometimes you’d like to change the default thumbnail (or Medium/Large) images dimensions when the user is switching to your WordPress site. The default setting for a thumbnail is 150×150 pixels.

Thumbnail Size in WordPress

This thumb uses what’s called a ‘hard crop’ since we enabled the setting Crop thumbnail to exact dimensions. What this means is that WordPress will take the thumbnail size you set, ‘fill’ the area with the image you use, and leave the rest of the image off. A ‘soft crop’, on the other hand, is a resize that shrinks your images while retaining their proportions.

Change Thumbnail Size in WordPress

For now, go ahead and choose your new default thumbnail size. Then, remember to save the changes to your settings. Once you set a new default thumbnail size, WordPress will use it for all images you upload from that moment on. However, what if you already have a sizable media library that uses other thumbnail sizes? Instead of re-uploading those images, you can simply ‘resize’ them. The best tool for that job is the Thumbnail regenerate WordPress plugin.

What this plugin does is take all your existing thumbnails and resize them, one by one. It also works on the other image sizes WordPress uses, such as Medium, Large, and so on. That means you can use it even if you change any of those default dimensions (which we’ll show you how to do later).

To get started, install and activate the plugin. Once you do, jump to the Settings > Rebuild Thumbnail tab and choose the images you want to resize, and then click on the Rebuild All Thumbnails button: The process might take a while, depending on how many images your media library contains. So be patient, and don’t close the tab until you see the Done message appear.

Reasons to Change Your WordPress Thumbnail?

At this point, we’ve already covered the how when it comes to changing your thumbnail size, but we haven’t discussed why yet. WordPress’ default thumbnail size of 150×150 pixels can work well for some users, but no single image resolution is appropriate for all types of designs.

You might want larger thumbnails that show off more detail, for example. This is particularly relevant if you’re running an e-commerce store. Or you may want to use a more rectangular shape, especially when it comes to featured images for a blog or news site.

If you’re redesigning your website or trying out a new theme, it’s also a good idea to spend some time experimenting with image sizes, so you can see what works best with the new style. Plus, the process is so simple that it should barely take you a few minutes, and it doesn’t affect your existing media library unless you install the extra plugin we introduced above.

Custom Image Sizes in WordPress

Whenever you upload an image to WordPress, the platform works some magic in the background to resize that image into multiple dimensions you can use. As we mentioned earlier, this includes thumbnails, medium, and large images. Having multiple sizes of the same image can make your life easier, by enabling you to pick the option that best fits your needs.

You can change these default image sizes by using the same process we described above. However, you can also add new default sizes to your site. This can be a very useful option to have. You can set up specific sizes for all different types of images across your site, and avoid having to resize each new image manually.

To add new default image sizes to WordPress, you’ll need to edit your theme’s functions.php file. That means you’ll want to connect to your site using a File Transfer Protocol (FTP) client such as FileZilla, and then navigate to your site’s root folder. Once you’re there, open up the wp-content/themes directory and look for the folder that shares your theme’s name:

You should find the functions.php file inside this folder. Once you do, right-click on it and hit the View/Edit option. This will open the file using your local text editor, so you can make changes to it: Be very careful when making any changes to your theme’s functions.php file, and don’t change any of its existing content. Instead, you’ll want to add a new snippet of code at the bottom:

Code Example to WordPress Thumbs

// This enables the function that lets you set new image sizes
add_theme_support( ‘post-thumbnails’ );
// These are the new image sizes we cooked up
add_image_size( ‘post-image’, 660 );
// Now we register the size so it appears as an option within the editor
add_filter( ‘image_size_names_choose’, ‘my-custom-image-sizes’ );
function my-custom-image-sizes( $sizes ) {
return array_merge( $sizes, array(
‘post-image’ => __( ‘Post Images’ ),
) );
}

The comments within this code explain how it works quite well. First, it tells WordPress that you want to add new image sizes to your theme. Then it creates a new default option. Registers it so that it shows up within the editor the next time you open it.

add_image_size( ‘post-image’, 660 );

When you add new custom image sizes, you can set both width and height. In our example, we just set the width, which is always the first value. This means that WordPress will resize images to the width we want, and proportional height. If you want to add a specific height as well, your line would look like this instead:

add_image_size( ‘post-image’, 660, 480 );

Besides, any custom sizes you want, using a new line for each. Then save the changes to your functions.php file, and the new options should show up in your WordPress editor.

Final Thoughts in Thumbnail WordPress Usage

We hope this tutorial has helped you to learn how to add custom image sizes in WordPress. You may also want to check out our guide on how to customize your WordPress permalinks. There are also a couple of plugins that aim to be one-stop solutions to this process.



Share This Post