◦ Comprehensive security
◦ 24/7 support
WordPress Guide → Images → Change Thumbnail
How to change the thumbnail size in WordPress: PHP and more
WordPress thumbnails look simple—but they carry a surprising amount of influence. Whether you’re trying to clean up your blog layout or improve page speed, getting thumbnail sizes right is essential.
Let’s walk through how to change WordPress thumbnail size using PHP, plugins, and built-in settings—plus some lesser-known tips for better performance.
Get fast, reliable hosting for WordPress
Power your site with the industry’s fastest, most optimized WordPress hosting
Why change WordPress thumbnail size?
WordPress creates several image sizes every time you upload a photo. These include “thumbnail,” “medium,” and “large” sizes, which are used in everything from blog excerpts to product galleries.
You might want to resize thumbnails if:
- Images look stretched, blurry, or cropped awkwardly on your site.
- You want a more consistent design across posts or pages.
- You’re optimizing for mobile or speeding up page load times.
Thumbnail size affects both aesthetics and performance. It’s worth getting right.
Understanding default thumbnail sizes in WordPress
By default, WordPress generates three sizes for every image you upload:
- Thumbnail – 150×150 pixels (cropped square).
- Medium – 300×300 pixels (scaled proportionally).
- Large – 1024×1024 pixels (scaled proportionally).
You can view and change these values from your WordPress dashboard under Settings > Media. However, any changes only apply to new image uploads. Existing media will stay the same unless you regenerate thumbnails.
Method 1: Change thumbnail sizes in WordPress settings
If you just want to update the default sizes, the easiest option is the built-in Media Settings panel.
- In your WordPress dashboard, go to Settings > Media.
- Under Thumbnail size, update the width and height values.
- Decide whether you want thumbnails to be cropped to exact dimensions (check or uncheck “Crop thumbnail to exact dimensions”).
- Click Save Changes.
Keep in mind, this will only affect images uploaded after the change. Use a plugin like Force Regenerate Thumbnails to apply new sizes to old uploads.
Method 2: Resize thumbnails using PHP in your theme
For more control, or if you’re building a custom theme, you can change thumbnail sizes using code.
- Go to Appearance > Theme File Editor and open your functions.php file.
- Add or update the following:
set_post_thumbnail_size(300, 200, true); // Thumbnail size with hard crop
add_image_size(‘custom-thumb’, 400, 300, true); // Add a new custom size - Use the_post_thumbnail(‘custom-thumb’) in your template files to call your custom size.
After adding or changing sizes in code, install and run the Regenerate Thumbnails plugin so WordPress can generate the correct versions for your existing images.
Method 3: Use a plugin to change thumbnail sizes
If you prefer not to touch code, plugins make it easy to resize and regenerate thumbnails.
Popular options include:
- Force Regenerate Thumbnails – Bulk regenerate thumbnail sizes for all existing images.
- Crop-Thumbnails – Gives you fine-grain control over how each thumbnail is cropped.
With these plugins, you can:
- Change thumbnail dimensions for existing sizes.
- Register new custom sizes without editing functions.php.
- Regenerate thumbnails in bulk after resizing.
Method 4: Adjust thumbnail size in a page builder or theme
Themes and page builders often override or enhance WordPress’s thumbnail handling. For example:
- Divi includes options inside the Image module to set dimensions manually.
- Elementor lets you choose from all available image sizes when adding a widget.
- Some themes, like Astra or OceanWP, let you set featured image sizes in the Customizer.
Always check your theme or page builder’s documentation. Using the tools built into your design stack can avoid conflicts or unexpected layout issues.
Method 5: Crop or force exact thumbnail dimensions
Sometimes you want thumbnails to be exactly a certain size, especially if you’re designing a grid layout.
In PHP, this is done by enabling hard cropping:
set_post_thumbnail_size(300, 200, true); // true = hard crop
You can also apply this to any custom size using add_image_size() with the true flag.
Prefer a visual approach? The Crop-Thumbnails plugin lets you adjust crop areas for each image individually, ensuring the right parts of your images are visible in thumbnails.
Pro tip: Optimize thumbnail sizes for mobile performance
Here’s where you can take things further than most WordPress users: optimizing for mobile performance.
WordPress automatically uses srcset to serve responsive images, but you can improve this by registering a mobile-specific image size:
add_image_size(‘thumb-mobile’, 150, 100, true);
Then, in your templates, conditionally use this size for mobile users. This reduces image payload and improves performance on small devices. You can also use plugins like Imsanity to prevent large images from being uploaded in the first place.
Image thumbnail FAQs
Next steps for changing thumbnail size in WordPress
WordPress gives you plenty of options for adjusting thumbnail sizes—whether you want a simple setting tweak or need full control with PHP. A consistent image layout not only looks better but improves load times and user experience too.
Start by reviewing your current thumbnail dimensions in Settings > Media, then choose the method that matches your comfort level—code, plugin, or theme controls.
Ready to upgrade your WordPress experience? Professional hosting improves speeds, security, and reliability for a website and a brand that people find engaging and trustworthy.
Don’t want to deal with server management and maintenance? Our fully managed hosting for WordPress is the best in the industry. Our team are not only server IT experts, but WordPress hosting experts as well. Your server couldn’t be in better hands.
Click through below to explore all of our hosting for WordPress options, or chat with a WordPress expert right now to get answers and advice.
Additional resources
What is WordPress? →
A complete beginner’s guide to WordPress.org
WordPress WebP files went blank? Let’s fix it →
Fix the issue of WebP images appearing blank in WordPress by understanding common causes and applying effective solutions.
What is managed WordPress hosting? →
Discover how an added layer of support takes server IT off your shoulders