wp media regenerate <attachment-id>

Regenerates thumbnails for one or more attachments

Arguments

NameDescription
attachment-idOne or more IDs of the attachments to regenerate

Options

NameDescription
--image_size <image_size>Name of the image size to regenerate. Only thumbnails of this image size will be regenerated, thumbnails of other image sizes will not
--skip-deleteSkip deletion of the original thumbnails. If your thumbnails are linked from sources outside your control, it’s likely best to leave them around. Defaults to false
--only-missingOnly generate thumbnails for images missing image sizes
--yesAnswer yes to the confirmation message. Confirmation only shows when no IDs passed as arguments