Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

How to Regenerate Thumbnails in WordPress (After a Theme or Image-Size Change)

Changing a WordPress theme does not rebuild thumbnails for existing uploads. Learn when to use the Regenerate Thumbnails plugin, how to inspect registered sizes, and the WP-CLI commands for full, selective, missing-only, and URL-safe regeneration.
WorldWordPress Length9 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When you change a WordPress theme or register a new image size, WordPress does not automatically create that size for images already in your Media Library. Regenerate those derivatives with the Regenerate Thumbnails plugin from the dashboard or with WP-CLI’s wp media regenerate command. Use the plugin when you need a graphical workflow; use WP-CLI when you need precise scope, repeatable commands, or a large-library job.

What thumbnail regeneration actually does

WordPress stores an uploaded image as an attachment and usually creates several derivative files, such as thumbnail, medium, large, and sizes registered by a theme or plugin. A theme change can introduce different dimensions or crop rules, but existing attachments still have the derivatives that were created when they were uploaded. Regeneration reads the sizes currently registered on the site and creates files for existing attachments.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The process does not replace the original full-size upload. It creates or recreates derivative files and updates the attachment’s image metadata so WordPress knows which files and dimensions are available. It also does not decide which image a page should display. A block, theme template, custom field, or page-builder setting can still request a different registered size after regeneration.

When regeneration is needed

  • You changed themes and the new theme uses different thumbnail dimensions or crop modes.
  • You added an image size with a theme or plugin and want it available for older uploads.
  • Some derivative files are missing because an earlier upload or migration was incomplete.
  • You changed an existing registered size and need old attachments rendered using the current definition.

When it will not solve the problem

Regeneration cannot make an unregistered size appear. It also cannot override a block or template that requests another size, and it does not by itself purge a content-delivery network or page cache. If the front end still displays an unexpected dimension, inspect the requested size in the block or theme and then check the attachment metadata and generated files.

#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter | 4Pack Type C Female to A Male Cable Converter for Apple Duo 17 16 15 14 Plus,iWatch Watch 12 11 10,iPad 9 8 Air,Airpods 5 4
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Prepare the site before running a library-wide job

A full media library can contain thousands of attachments. Decide the scope first instead of immediately processing everything.

Confirm access and a recovery point

  • Dashboard regeneration requires administrator-level access and the Regenerate Thumbnails plugin.
  • WP-CLI regeneration requires shell access, a working WP-CLI installation, and permission to run commands from the WordPress installation.
  • Make a database and uploads backup before a broad operation. Keep the backup until you have checked representative pages.
  • Check available storage. Regeneration can create several derivatives per attachment, and a changed size definition may temporarily require additional disk space.
  • For a high-traffic site, schedule a large run for a quiet period or perform it on staging first.

Inspect the sizes WordPress currently knows about

With WP-CLI, run wp media image-size. The command lists each registered size, its name, width, height, crop mode, and ratio. This is the authoritative checklist for what a regeneration run can create. If the size you expect is absent, fix the theme or plugin registration first; rerunning regeneration will not invent it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Dashboard users should likewise confirm that the intended theme and image-size plugin are active before starting. The derivative definitions come from the current configuration, not from the configuration that existed when an image was uploaded.

Dashboard method: Regenerate Thumbnails plugin

The WordPress developer reference points administrators to the Regenerate Thumbnails plugin for a graphical workflow. The plugin operates on existing attachments and uses the sizes registered by the active theme and plugins.

  1. Install and activate the Regenerate Thumbnails plugin from the WordPress dashboard.
  2. Open the plugin’s administration screen and review the available regeneration action and scope before confirming it.
  3. Start with a limited set of attachments if you are validating a new size or crop. Use a full-library run only after checking the result on representative posts and archive pages.
  4. Allow the process to finish. Keep the browser window open if the plugin presents a progress screen, and do not start overlapping regeneration jobs.
  5. Open several older posts, featured-image views, and media-library entries to confirm that the expected derivatives are present.
  6. When the front end still shows an old image, inspect the block or template’s requested size and clear any site, proxy, or CDN cache according to that system’s own procedure.

Exact menu names and button labels can change between plugin releases, so follow the controls shown by the installed version rather than relying on an old screenshot. The important choices are the attachments to process and the currently registered sizes, not a particular label.

What the dashboard workflow is good for

  • Editors who have dashboard access but no shell access.
  • One-off operations after a theme redesign.
  • Visual confirmation that a run has started and completed.
  • Small or medium libraries where manually launching a job is acceptable.

Dashboard limitations

A graphical run is less convenient to reproduce on another site or after a later migration. The plugin screen may also offer fewer controls over attachment IDs, individual sizes, or deletion behavior than WP-CLI. For a large or regularly maintained library, command-line options provide a clearer record of exactly what was processed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter | USB C Dongle with 90W Max Power Delivery, 3×5Gbps USB A Data Ports, for MacBook, Dell, and More (Charger Not Included)
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

WP-CLI method: precise, repeatable regeneration

WP-CLI’s command is documented as regenerating thumbnails for one or more attachments. Run commands from the WordPress installation, and confirm that the site and environment are the intended ones before processing production media.

1. Review registered image sizes

Start with:

wp media image-size

Review the names, dimensions, crop modes, and ratios in the output. This prevents a common mistake: regenerating successfully while expecting a size that is not registered.

2. Regenerate the entire library

For all attachments, use:

wp media regenerate --yes

The --yes flag accepts the command’s confirmation prompt, making it suitable for a planned, non-interactive run. Confirm the scope before executing it; this command is intentionally broad.

3. Regenerate selected attachments

Pass attachment IDs when only particular files need work:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

wp media regenerate 123 124 125

Replace those example IDs with the attachments you actually need. This is useful for testing a new crop on a few posts, repairing files identified in an audit, or avoiding an unnecessary library-wide run.

4. Regenerate selected sizes only

Use the --image_size option when the library already has usable derivatives and only one registered size changed:

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter | 85W Max PD, 2 USB 3.0 & 1 USBC Data Ports, SD/TF Card Reader, for Laptops/Mac and Other Type C Devices (Charger Not Included)
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

wp media regenerate --image_size=large

To process several sizes, repeat the option, for example:

wp media regenerate --image_size=thumbnail --image_size=medium

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Other registered sizes are not regenerated by a run restricted this way. Combine the option with attachment IDs when you need both limits, such as a single size for a known group of files.

5. Create only missing derivatives

When some files exist and others do not, use:

wp media regenerate --only-missing --yes

This avoids recreating derivatives that are already present and focuses the job on missing files. It is useful after an interrupted migration or a partial upload copy. It does not intentionally rebuild an existing file whose dimensions or crop no longer match the current registration; use a normal regeneration run for that case.

6. Preserve old thumbnail files when external URLs may depend on them

If other sites, feeds, documents, or hard-coded links may refer to older thumbnail filenames, use:

wp media regenerate --skip-delete --yes

The official command documentation describes --skip-delete as skipping deletion of original thumbnails and recommends it when thumbnails are linked from sources outside your control. This preserves those older files while new derivatives are generated, at the cost of retaining more files on disk.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray | Data transfer & Fast charging for MacBook, iPhone 17/16/15, iPad, Samsung Galaxy, Apple Watch
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

WP-CLI options at a glance

Command or option Scope or behavior Best use Important caution
wp media image-size Lists registered names, dimensions, crop mode, and ratio Verify what the site can generate An absent size must be registered before regeneration
wp media regenerate --yes Regenerates all attachments without an interactive confirmation Theme-wide or library-wide rebuild Broad scope; confirm the target site and storage first
wp media regenerate 123 124 125 Processes only the listed attachment IDs Targeted repair or testing Use real attachment IDs, not post IDs unless they are also attachment IDs
--image_size=large Processes only the named registered size; repeat for additional sizes Rebuild one or a few changed sizes Other sizes are left untouched
--only-missing Creates derivatives that are missing Partial migrations or incomplete uploads Does not rebuild an existing but outdated derivative
--skip-delete Skips deletion of original thumbnail files Sites with external links to old thumbnail URLs Consumes more storage

Plugin or WP-CLI: which should you choose?

Decision factor Regenerate Thumbnails plugin WP-CLI
Access WordPress dashboard and administrator privileges Shell access, WP-CLI, and the correct WordPress installation
Scope control Graphical controls supplied by the installed plugin version All attachments, selected IDs, selected sizes, or missing files through explicit arguments
Repeatability Manual operation that is harder to document exactly Commands can be saved in deployment notes or scripts
Large libraries Convenient to start, but browser-based progress may be less practical for long jobs Better suited to planned, monitored, or automated runs
Deletion control Depends on the controls exposed by the installed plugin version --skip-delete gives an explicit preservation choice
Best fit One-off work by a site administrator without terminal access Developers, agencies, migrations, and repeatable maintenance

Choose the dashboard when the main constraint is access or ease of use. Choose WP-CLI when you need to state exactly which attachments or sizes are processed, run the same operation again, or protect legacy URLs with a command-line option.

Deletion, old sizes, and URL compatibility

Changing a registered size can leave older derivative files that no longer correspond to the current configuration. The normal regeneration process can replace derivatives, while --skip-delete is the documented way to avoid deleting original thumbnail files when outside references may exist.

WP-CLI also documents --delete-unknown, which targets old sizes that are no longer registered. Treat that as a cleanup operation, not as a default regeneration step. First confirm that no external page, feed, email, or application still references those files. A file can be absent from the current WordPress metadata and still be reachable through a URL stored elsewhere.

There is also an --update-attachment-refs option described as a nightly, not-yet-stable feature. Do not make it part of a normal production workflow. If you need attachment references changed, validate the behavior in a non-production environment and use a stable, documented process instead.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting after regeneration

The new size does not appear in the output

Run wp media image-size again and check the registration name exactly. A typo, inactive plugin, or theme code that registers the size only under certain conditions can prevent it from being available. Fix registration first, then regenerate.

The front end still shows the wrong dimensions

Regeneration creates files; it does not change the size selected by a block, theme, or custom markup. Inspect the image block’s size setting or the template code that builds the image URL. Compare that requested size with the files and metadata for the attachment. If the requested size is correct but an old response remains, investigate the site’s page cache, proxy, or CDN; their behavior is environment-dependent.

Best Value
Sale
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display | 85W Max PD, 1 Powered USB-C 5Gbps & 2 Powered USB-A 3.0 5Gbps Data Ports, for MacBook Pro, MacBook Air, Dell and More (Black)
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Only some images changed

Check whether the command used attachment IDs, an image-size filter, or --only-missing. Each of those intentionally narrows the work. Also verify that the attachments are present in the current Media Library and that the process completed rather than stopping partway through.

Old image URLs return errors

If external systems depend on legacy thumbnail files, rerun future jobs with --skip-delete and restore any files removed by an earlier run from backup. Do not use --delete-unknown until those external references have been audited.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The run is too large to manage interactively

Split the work by attachment IDs or by registered size, and run the commands from a monitored shell session. On a staging copy, measure the operational impact and verify the resulting pages before scheduling the production job. The exact runtime depends on image count, dimensions, server resources, and storage, so the command documentation does not provide a universal duration or success-rate figure.

A repeatable maintenance workflow

  1. Record the theme and plugins that register image sizes.
  2. Run wp media image-size and save the output with the maintenance notes.
  3. Choose a test group of attachment IDs that represents featured images, in-content images, and any unusual aspect ratios used by the site.
  4. Regenerate that group with the intended size and deletion options.
  5. Check the generated images, attachment metadata, and front-end requests on staging or a protected preview.
  6. Run the approved command for the remaining attachments, using --only-missing for a missing-file repair or --skip-delete when legacy URLs must remain available.
  7. Review representative posts and archives, then retain the backup until verification is complete.

This sequence separates registration errors from generation errors and makes the scope explicit before a potentially destructive library-wide operation.

Decision guide

  • Need a dashboard-only solution: install Regenerate Thumbnails and follow the controls shown by the installed release.
  • Need every attachment rebuilt: use wp media regenerate --yes after checking registered sizes and storage.
  • Need only a few files: pass their attachment IDs to wp media regenerate.
  • Need one changed size: add --image_size=... and repeat the option for additional sizes.
  • Need to fill gaps without rebuilding existing files: use --only-missing.
  • Need to protect old thumbnail URLs: use --skip-delete and avoid cleanup options until references are understood.

Regeneration is the right repair when the files for currently registered image sizes are missing or stale. If the generated files are correct but a page still requests another dimension, the next fix belongs in the block, theme, template, or caching layer—not in another blanket regeneration run.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.