Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Fix WordPress Not Generating Image Thumbnails

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

If your WordPress site shows broken images or only the full-size version instead of cropped thumbnails, the image editor on your server is likely failing to create the additional sizes. This guide walks you through the most common causes—missing PHP extensions, incorrect file permissions, and plugin conflicts—and shows you how to fix each one so new uploads generate all required thumbnail sizes.

What You'll Need

  • Access to your WordPress admin dashboard (wp-admin)
  • FTP credentials or a file manager in your hosting control panel (cPanel, Plesk, etc.)
  • Ability to install or activate plugins (for the regeneration step)
  • Basic comfort with editing files like wp-config.php or .htaccess (only if needed)

Step-by-Step

  1. Check if the problem is with new uploads or existing images. Go to Media → Library and upload a test image. If the new image shows all thumbnail sizes (check by opening the attachment details), then the issue is only with previously uploaded images—skip to Step 6. If the new image also lacks thumbnails, continue to Step 2.
  2. Verify that your server supports image editing. WordPress uses PHP's GD or Imagick library to create thumbnails. Check if either is enabled by going to Tools → Site Health and looking for the “PHP image editing” section. If it says “Not available,” contact your hosting provider and ask them to enable the GD extension (or Imagick). If both are enabled, move to the next step.
  3. Check file permissions. The wp-content/uploads folder must be writable by the web server. Using FTP or your hosting file manager, right-click the uploads folder and set permissions to 755 (directories) and 644 (files). If you see 666 or 777, try changing to the safer values as some servers block those. After changing, test a new upload.
  4. Disable all plugins temporarily. Some plugins (especially caching, optimization, or security plugins) interfere with thumbnail generation. Go to Plugins → Installed Plugins, select all, and choose “Deactivate.” Then try uploading a new image. If thumbnails work, reactivate plugins one by one until you find the culprit. Once identified, either replace it or contact the plugin developer.
  5. Switch to a default theme. Your active theme might have custom code that breaks thumbnail generation. Temporarily switch to a default WordPress theme (like Twenty Twenty-Four) by going to Appearance → Themes. Test a new upload. If it works, your theme is the issue—check its functions.php for incorrect add_image_size() calls or missing after_setup_theme hook.
  6. Regenerate existing thumbnails. If the problem is only with old images, install a plugin like “Regenerate Thumbnails” or “Force Regenerate Thumbnails.” After activation, go to Tools → Regenerate Thumbnails and click “Regenerate All.” This will recreate all missing sizes. If you have many images, this may take a while.
  7. Increase PHP memory limit. Sometimes the image editor runs out of memory. Add this line to your wp-config.php file (just before the “That's all, stop editing!” line):
    define('WP_MEMORY_LIMIT', '256M');
    Then test a new upload.
  8. Check for corrupted .htaccess (if on Apache). If you have custom rules that block image processing, rename your .htaccess file to .htaccess_backup and test. If thumbnails work, you need to add the default WordPress rules back (go to Settings → Permalinks and click “Save Changes” to regenerate).
  9. Verify that your theme's thumbnail sizes are defined. If you recently changed themes, the new theme might not have the same image sizes as the old one. Check your theme's functions.php for add_image_size() calls. If none exist, WordPress uses the default sizes (thumbnail, medium, large). If you need custom sizes, add them correctly within the after_setup_theme hook.

Common Mistakes

  • Forgetting to regenerate after changing thumbnail sizes. If you add a new image size, WordPress only applies it to new uploads. You must regenerate old ones.
  • Using incorrect file permissions. Setting folders to 777 can cause security issues, and some hosts block it. Use 755 for directories and 644 for files.
  • Assuming the issue is with the media library. Sometimes the problem is on the front end (e.g., a CDN or caching plugin serving old versions). Clear all caches after fixing the underlying issue.
  • Editing the wrong file. Make sure you're editing wp-config.php in the root of your WordPress installation, not a copy elsewhere.
  • Not testing with a fresh upload. Always test with a new image after each change to isolate the fix.

Tips

  • Use a plugin to see all registered image sizes. Plugins like “Simple Image Sizes” or “Show Image Sizes” can list all sizes and their dimensions, helping you spot conflicts.
  • Keep your WordPress core, themes, and plugins updated. Outdated software can have bugs that affect image handling.
  • If using a CDN, purge the cache after regenerating. Otherwise, you might still see broken images.
  • Consider using Imagick over GD. Imagick handles image processing more efficiently and supports more formats. If your host offers both, ask them to enable Imagick.
  • Backup your site before making changes. Especially before editing files or running bulk regeneration.

Troubleshooting

If the steps above don't resolve the issue, try the following:

  • Check the server error logs. Look for PHP errors related to image processing (e.g., “memory exhausted” or “GD library not found”). Your hosting control panel usually has a “Error Logs” section.
  • Test with a different image format. Some hosts have issues with certain formats (e.g., WebP). Try uploading a JPEG and a PNG to see if the problem is format-specific.
  • Disable hotlinking protection. Some security plugins or server rules block image requests from other domains, which can appear as broken thumbnails. Temporarily disable any hotlink protection.
  • Check if the issue is browser-specific. Try a different browser or incognito mode to rule out cached pages.
  • If all else fails, reinstall WordPress core. Go to Dashboard → Updates and click “Reinstall now.” This won't affect your content but can fix corrupted core files.

Frequently Asked Questions

Why did my thumbnails stop working after I updated WordPress?

Updates can change how image sizes are registered or conflict with plugins. Try deactivating all plugins and switching to a default theme to isolate the issue.

Can I manually create thumbnails without a plugin?

You can use a script or FTP to upload pre-cropped images, but it's not practical for many images. The easiest way is to use a regeneration plugin.

What is the difference between GD and Imagick?

Both are PHP libraries that process images. Imagick generally produces better quality and uses less memory. GD is more commonly enabled on shared hosts.

Why are my thumbnails blurry or distorted?

This usually happens when the crop ratio doesn't match the original image's aspect ratio. Check your theme's add_image_size() definitions and ensure you're using the correct crop parameter.

Do I need to regenerate thumbnails after changing my theme?

Yes, because different themes register different image sizes. Regenerating will create the sizes your new theme expects.

Can I increase the number of thumbnail sizes?

Yes, by adding add_image_size() in your theme's functions.php. But each new size increases server load and storage usage, so use them sparingly.