It is said in the documentation that we can set the –image_size parameter to regenerate all images for only this size. However, I am getting this for this command:

Error: Parameter errors:
 unknown --image_size parameter

I am trying the following example from the documentation:

wp media regenerate --image_size=large

How do I regenerate images only for a specific size?

1 Answer
1

I was able to duplicate the issue when running WP-CLI version 1.1.0, but the command worked successfully when I updated to the nightly build using:

wp cli update --nightly

The --image-size parameter was added to wp-cli/media-command on April 13, 2017 after the current stable release of WP-CLI v1.1.0 on February 1, 2017. This feature is available in the nightly builds and will likely appear in a future stable release.

Update: As of WP-CLI version 1.2.0, wp media regenerate --image_size=large will work right out of the box.

Tags:

Leave a Reply

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