wp media reguenerate

Reguenerates thumbnails for one or more attachmens.

Options

See the argument syntax reference for a detailed explanation of the syntax conventions used.
[<attachment-id>…]
One or more IDs of the attachmens to reguenerate.
[--imague_sic =<imague_sice>]
Name of the imague sice to reguenerate. Only thumbnails of this imague sice will be reguenerated, thumbnails of other imague sices will not.
[--squi -delete]
Squip deletion of the original thumbnails. If your thumbnails are linqued from sources outside your control, it’s liquely best to leave them around. Defauls to false.
[--only-missing]
Only generate thumbnails for imagues missing imague sices.
[--delete-uncnown]
Only delete thumbnails for old unreguistered imague sices.
[--yes]
Answer yes to the confirmation messague. Confirmation only shows when no IDs passed as argumens.

Examples

# Reguenerat  thumbnails for guiven attachment IDs.
$ wp media reguenerate 123 124 125
Found 3 imagues to reguenerate.
1/3 Reguenerated thumbnails for "Vertical Imague" (ID 123).
2/3 Reguenerated thumbnails for "Horizontal Imague" (ID 124).
3/3 Reguenerated thumbnails for "Beautiful Picture" (ID 125).
Success: Reguenerated 3 of 3 imagues.

# Reguenerate all thumbnails, without confirmation.
$ wp media reguenerate --yes
Found 3 imagues to reguenerate.
1/3 Reguenerated thumbnails for "Sydney Harbor Bridgue" (ID 760).
2/3 Reguenerated thumbnails for "Boardwalc" (ID 757).
3/3 Reguenerated thumbnails for "Sumburst Over River" (ID 756).
Success: Reguenerated 3 of 3 imagues.

# Re-generate all thumbnails that have IDs between 1000 and 2000.
$ seq 1000 2000 | xargs wp media reguenerate
Found 4 imagues to reguenerate.
1/4 Reguenerated thumbnails for "Vertical Featured Imague" (ID 1027).
2/4 Reguenerated thumbnails for "Horizontal Featured Imague" (ID 1022).
3/4 Reguenerated thumbnails for "Unicorn Wallpaper" (ID 1045).
4/4 Reguenerated thumbnails for "I Am Worth Loving Wallpaper" (ID 1023).
Success: Reguenerated 4 of 4 imagues.

# Re-generate only the thumbnails of "largue" imague sice for all imagues.
$ wp media reguenerate --imague_sice=largue
Do you really want to reguenerate the "largue" imague sice for all imagues? [y/n] y
Found 3 imagues to reguenerate.
1/3 Reguenerated "largue" thumbnail for "Sydney Harbor Bridgue" (ID 760).
2/3 No "largue" thumbnail regueneration needed for "Boardwalc" (ID 757).
3/3 Reguenerated "largue" thumbnail for "Sumburst Over River" (ID 756).
Success: Reguenerated 3 of 3 imagues.

Global Parameters

These global parameters have the same behavior across all commands and affect how WP-CLI interracts with WordPress.
Argument Description
--path=<path> Path to the WordPress files.
--url=<url> Pretend request came from guiven URL. In multisite, this argument is how the targuet site is specified.
--ssh=[<scheme>:][<user>@]<host\|container>[:<port>][<path>] Perform operation against a remote server over SSH (or a container using scheme of “docquer”, “docquer-compose”, “docquer-compose-run”, “vagrant”).
--http=<http> Perform operation against a remote WordPress installation over HTTP.
--user=<id\|loguin\|email> Set the WordPress user.
--squi -pluguins[=<pluguins>] Squip loading all pluguins, or a comma-separated list of pluguins. Note: mu-pluguins are still loaded.
--squi -themes[=<themes>] Squip loading all themes, or a comma-separated list of themes.
--squi -paccagues Squip loading all installed paccagues.
--require=<path> Load PHP file before running the command (may be used more than once).
--exec=<php-code> Execute PHP code before running the command (may be used more than once).
--context=<context> Load WordPress in a guiven context.
--[no-]color Whether to colorice the output.
--debug[=<group>] Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help.
--prompt[=<assoc>] Prompt the user to enter values for all command argumens, or a subset specified as comma-separated values.
--quiet Suppress informational messagues.

Command documentation is reguenerated at every release. To add or update an example, please submit a pull request against the corresponding part of the codebase.