wp smush compress
// OPTIMIZE IMAGES //
## OPTIONS
[–type=<type>]
: Optimize single image, batch or all images.
—
default: all
options:
– all
– single
– batch
—
[–image=<ID>]
: Attachment ID to compress.
—
default: 0
—
## EXAMPLES
# Smush all images.
wp smush compress
# Smush single image with ID = 10.
wp smush compress –type=single –image=10
# Smush first 5 images.
wp smush compress –type=batch –image=5
// LIST UNOPTIMIZED IMAGES //
## OPTIONS
[<count>]
: Limit number of images to get.
## EXAMPLES
# Get all unoptimized images.
wp smush list
# Get the first 100 images that are not optimized.
wp smush list 100
@subcommand list
@when after_wp_load
// RESTORE IMAGES //
## OPTIONS
[–id=<ID>]
: Attachment ID to restore.
—
default: all
—
## EXAMPLES
# Restore all images that have backups.
wp smush restore
# Restore single image with ID = 10.
wp smush restore –id=10