Creating different size thumbnails in WordPress can greatly enhance the visual appeal and user experience of your website. By generating custom thumbnails for various sections of your site, you ensure that images look perfect, no matter where they appear. In this guide, we’ll walk you through the process of creating and managing different size thumbnails in WordPress without using any plugins.
Why Create Different Size Thumbnails?
Having different size thumbnails allows you to:
- Optimize Image Display: Ensure images look great on all devices and sections of your site.
- Improve Page Load Times: Use appropriately sized images to reduce load times.
- Enhance User Experience: Provide a visually cohesive experience across your site.
Step 1: Register New Thumbnail Sizes
To start, you need to register new thumbnail sizes in your theme’s functions.php file. If you don’t have a child theme, you can use our free child theme generator.
- Open your child theme’s
functions.phpfile. - Add the following code to register new image sizes:
/*
* Snippet: How to Create Different Size Thumbnails in WordPress – 2026
* Author: John Cook
* URL: https://wcsuccessacademy.com/?p=1361
* Tested with WooCommerce 10.7.0
* "Register new thumbnail sizes"
*/
function wcsuccess_custom_thumbnail_sizes() {
// Add new image sizes
add_image_size('custom-size-small', 100, 100, true);
add_image_size('custom-size-medium', 300, 300, true);
add_image_size('custom-size-large', 600, 600, true);
// Add to media library selection
add_filter('image_size_names_choose', 'wcsuccess_custom_sizes');
}
add_action('after_setup_theme', 'wcsuccess_custom_thumbnail_sizes');
function wcsuccess_custom_sizes($sizes) {
return array_merge($sizes, array(
'custom-size-small' => __('Custom Size Small'),
'custom-size-medium' => __('Custom Size Medium'),
'custom-size-large' => __('Custom Size Large'),
));
}
Step 2: Regenerate Thumbnails
After registering new image sizes, you need to regenerate thumbnails for existing images to make use of the new sizes. You can do so by either adding some code to regenerate thumbnails without a plugin or use the plugin below:
- Install and activate the Regenerate Thumbnails plugin.
- Go to
Tools > Regenerate Thumbnails. - Click the
Regenerate Thumbnailsbutton to regenerate all images.
Step 3: Use Custom Thumbnails in Your Theme
Now that your thumbnails are generated, you can use them in your theme templates.
- Open the template file where you want to display the custom thumbnails.
- Replace the existing
the_post_thumbnail()function with your custom size:
/*
* Snippet: How to Create Different Size Thumbnails in WordPress – 2026
* Author: John Cook
* URL: https://wcsuccessacademy.com/?p=1361
* Tested with WooCommerce 10.7.0
* "Use custom thumbnail sizes in theme templates"
*/
if (has_post_thumbnail()) {
the_post_thumbnail('custom-size-medium'); // Replace 'custom-size-medium' with your desired size
}
Step 4: Display Custom Thumbnails in Widgets
To display custom thumbnails in widgets, such as recent posts or related posts widgets, you need to modify the widget’s code.
- Open the widget’s template file.
- Replace the thumbnail size parameter with your custom size:
Conclusion
By following these steps, you can easily create and manage different size thumbnails in WordPress. This approach allows you to optimize your site’s visual presentation, improve page load times, and enhance the overall user experience without relying on additional plugins.
For more customisation tips and tools, don’t forget to check out our free WordPress child theme generator.
I have been working with WordPress and WooCommerce since 2012 and have developed a deep knowledge of the content management system. Since 2012, I have developed several plugins and designed dozens of websites utilising different frameworks, CMS’s and programming languages. I am proficient in PHP, Python, Java, C, C++, R and JavaScript with limited experience in Go, Kotlin and Swift.
Educationally, I have a Master’s degree in cyber security a Bachelor’s (Hons, First Class) in Applied Research and a Graduate Certificate in Data Science. I’m currently undertaking PhD studies investigating IoT cybersecurity. I recently graduated with First Class Honours and Masters of Information Technology, receiving the Executive Dean’s Award for studies undertaken in the 2021 and 2022 academic years. I have worked in the information technology industry for the past 11 years primarily as a software/web developer specific to design, optimisation, network management and security. My research interests are in the areas of Internet of Things (IoT), 5G and Beyond Networks, information security for wireless networks and software development.
Stay In Touch

