Troubleshooting · Troubleshooting
How to Fix Thumbnails Not Generating in WordPress
Short answer
Thumbnails fail when WordPress cannot process the image, usually because the GD or Imagick library is missing, the server runs out of memory, or the size was never registered. Check Tools, then Site Health, then Info for the Media Handling section, fix the cause, then regenerate thumbnails for old images. New uploads work at once, while old images need regeneration.
Key takeaways
- WordPress makes thumbnails at upload time, so a missing size on old images needs regeneration.
- The Settings Media screen needs the GD graphics library installed on the server.
- Default sizes are 150 by 150 for thumbnails, 300 for medium, 768 for medium-large, and 1024 for large.
- Images wider than 2560 pixels get a scaled copy, and PNG images skip that scaling.
- The Regenerate Thumbnails plugin rebuilds sizes from Tools, then Regenerate Thumbnails.
- WP-CLI rebuilds the whole library with wp media regenerate, and only-missing skips sizes that exist.
What does it mean when thumbnails do not generate?
WordPress stores the original upload but skips the smaller copies when image processing fails.
You see the full image in the Media Library, but grids, cards, and featured image spots show a broken picture or nothing at all.
The missing files usually end in a size suffix, such as -150x150, so check the uploads folder to confirm which sizes exist.
A missing thumbnail is not the same as a missing image, since the original file is still on the server.
If images do not show at all, the cause is different, so see our guide to images not showing.
What are the default WordPress image sizes?
WordPress creates four default sizes from every upload, plus the full original file.
| Size | Default limit | Where it is set |
|---|---|---|
| thumbnail | 150 by 150, cropped | Settings, then Media |
| medium | 300 by 300 max | Settings, then Media |
| medium_large | 768 wide, no height limit | No screen setting |
| large | 1024 by 1024 max | Settings, then Media |
The Theme Handbook lists these defaults as 150 by 150 for thumbnails, 300 by 300 for medium, 768 wide for medium-large, and 1024 by 1024 for large, as documented in Featured Images and Post Thumbnails.
Images wider or taller than 2560 pixels also get a scaled copy, and that copy becomes the largest available size, as the big image threshold hook explains.
Full size means the original upload, unchanged, so templates that ask for full skip the smaller copies entirely.
WordPress skips any size larger than the upload, so a 400-pixel image gets no 1024-pixel copy.
Why do thumbnails fail on new uploads?
Four causes explain most failures: a missing image library, low memory, a wrong size registration, or an unsupported file format.
- GD or Imagick missing: the server has no image library to resize with.
- Memory limit hit: a large photo needs more memory than PHP allows.
- Size never registered: the theme or plugin never called add_image_size for that size.
- Format not supported: the file type cannot be resized on this server.
WordPress.org states that you need the GD graphics library installed on your server to use the Media settings, as the Settings Media screen explains.
A plugin that changes image processing, such as an optimization plugin, can also break generation, so test with it off.
PHP defaults to a 128M memory limit, so a large photo can hit the ceiling during resize, as the PHP manual shows.
If the upload itself fails with a memory message, see our guide to the allowed memory size exhausted error.
If the upload fails before any resizing, see our guide to the HTTP error when uploading images.
How do you check Site Health for the cause?
Open Tools, then Site Health, then Info, and read the Media Handling and Filesystem Permissions sections.
Site Health also flags a missing GD or Imagick library as a critical issue, so read the Status tab first.
Media Handling shows which image library WordPress uses, and Filesystem Permissions shows whether WordPress can write to the uploads folder.
Then open Settings, then Media, and confirm the thumbnail, medium, and large values match the sizes your theme needs.
If the theme asks for a custom size, search its files for add_image_size and check that the name matches the size the template asks for.
Themes must declare support for featured images before the Featured Image box appears, so check for add_theme_support( 'post-thumbnails' ) in functions.php, as the Theme Handbook explains.
How do you fix a missing or wrong image size?
Register the size with add_image_size in the theme, then regenerate the old images.
The add_image_size reference shows that the function takes a name, width, height, and crop setting, and true means a hard crop to exact dimensions.
add_action( 'after_setup_theme', function() {
add_theme_support( 'post-thumbnails' );
add_image_size( 'card-thumb', 400, 300, true );
} );
Register sizes on the after_setup_theme hook, since that runs before WordPress processes uploads.
The crop setting accepts true for a center crop, false for a proportional resize, or an array such as left and top for a set crop position, as the add_image_size reference shows.
Keep custom sizes in a child theme or a small plugin, since a parent theme update wipes functions.php changes.
Changing Settings, then Media only affects new uploads, so old images still need regeneration.
For the right dimensions per layout, see our guide to properly sizing images in WordPress.
How do you regenerate thumbnails for old images?
Regeneration rebuilds every size from the original files, so fix the cause first or the same sizes fail again.
The Regenerate Thumbnails plugin rebuilds all thumbnail sizes for images already in the Media Library, and it also deletes old unused sizes to free server space.
- Install and activate Regenerate Thumbnails from Plugins, then Add New.
- Open Tools, then Regenerate Thumbnails.
- Click the regenerate button and wait for the process to finish.
- Check a few posts to confirm the images appear.
Regenerate one image first from the Media Library to test the fix before you run the whole library.
Version 3.1.6 of the plugin, updated 20 August 2025, holds a 4.6 out of 5 rating from 396 reviews, as shown on its WordPress.org plugin page.
Back up the media library first, since regeneration rewrites image files. Our guide to restoring a backup with UpdraftPlus covers the restore steps.
How do you regenerate with WP-CLI?
WP-CLI is faster for large libraries, since it runs without browser timeouts.
The plugin page recommends WP-CLI when you have command line access, since it is faster and can run inside a screen session, as the Regenerate Thumbnails plugin notes.
wp media regenerate --yes
Run the command from the WordPress install folder, and add --yes only when you are sure, since it skips the prompt.
The WP-CLI media regenerate docs show that --only-missing builds just the sizes an image lacks, and --skip-delete keeps the old files.
To rebuild one size only, add --image_size with the size name, such as wp media regenerate --image_size=large --yes.
How do you confirm the thumbnails are fixed?
Thumbnails are fixed when new uploads get every size and old images show their missing sizes.
- Upload a new image and check the uploads folder for the -150x150 file.
- Open a post with a featured image and confirm it shows.
- Reload a grid or archive page and confirm every card image loads.
- Check Site Health again to confirm the image library is present.
Compare the file count before and after, since a fixed library gains the missing size files.
If one size still fails, its name may not match the registered size, so compare the template call with the add_image_size name.
For modern formats, see our guide to serving images in next-gen formats.
What mistakes should you avoid?
Avoid five mistakes that waste a regeneration run.
- Do not regenerate before you fix the cause, or the same sizes fail again.
- Do not delete originals to save space, since regeneration needs them.
- Do not set a size to 0 unless you mean to stop that size.
- Do not use BMP or TIFF files for web images, since browsers handle them poorly.
- Do not regenerate a huge library during peak hours, since it loads the server.
MDN lists BMP and TIFF among formats to avoid for web content, and recommends JPEG for photos and PNG for precise reproduction, as the image format guide explains.
Write down the sizes your theme needs before you change anything, so you can check each one after regeneration.
Fix one cause at a time and test with a new upload after each change, so you know exactly what solved it.
Frequently asked questions
Do I need to regenerate thumbnails after changing theme?
Yes, when the new theme uses different sizes. The old images keep their old sizes until you regenerate them, while new uploads get the new sizes at once. Run Regenerate Thumbnails or wp media regenerate after the switch.
Why do some images get thumbnails but others do not?
The failing images are often a different format, much larger, or uploaded before the size existed. Check the file type and size, then regenerate the single image from the Media Library to see the exact error.
Can I stop WordPress from making so many thumbnail sizes?
Yes. Set the sizes you never use to 0 in Settings, then Media, or remove them with the intermediate_image_sizes filter in a child theme. Then delete the old files, since changing the setting does not remove them.
What if the uploads folder is not writable?
WordPress cannot save any size when the folder is not writable. Check Filesystem Permissions in Site Health, then ask the host to fix the folder permissions or ownership for wp-content/uploads.
Does regeneration change my original images?
No. Regeneration reads the original file and rebuilds only the smaller copies. The original stays untouched, which is why you must keep originals even if they take disk space.
When should I call my host?
Call your host when the GD or Imagick library is missing, when the uploads folder stays unwritable, or when regeneration fails with a server error. Send them the Site Health Media Handling lines for a faster answer.
Sources
- Featured Images & Post Thumbnails Developer.WordPress.org
- add_image_size() Developer.WordPress.org
- big_image_size_threshold Developer.WordPress.org
- wp media regenerate Developer.WordPress.org
- Settings Media screen WordPress.org
- Regenerate Thumbnails WordPress.org
- Description of core php.ini directives PHP Manual
- Image file type and format guide MDN Web Docs
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
