wp-media / imagify-plugin

Speed up your website with lighter images without losing quality.
https://imagify.io
73 stars 26 forks source link

WP CLI Next Generation image AVIF generation in folder fails #885

Open jasperf opened 7 months ago

jasperf commented 7 months ago

From the command line I am trying to generate the missing next generation images or AVIF. This as the generation via Dashboard hangs a lot.

Screenshot 2024-04-25 at 14 05 03

But the page on usage at https://imagify.io/documentation/how-to-use-wp-cli-for-imagify/ is unclear and so when I run this it fails

wp imagify generate-missing-nextgen wp-content/uploads/2024/03
PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function Imagify\Bulk\Bulk::run_generate_nextgen(), 1 passed in /home/debxxxxxx/domains/domain.com/public_html/wp-content/plugins/imagify/classes/CLI/GenerateMissingNextgenCommand.php on line 19 and exactly 2 expected in /home/debxxxxxx/domains/domain.com/public_html/wp-content/plugins/imagify/classes/Bulk/Bulk.php:223
Stack trace:
#0 /home/debxxxxxx/domains/domain.com/public_html/wp-content/plugins/imagify/classes/CLI/GenerateMissingNextgenCommand.php(19): Imagify\Bulk\Bulk->run_generate_nextgen()
#1 [internal function]: Imagify\CLI\GenerateMissingNextgenCommand->__invoke()
#2 phar:///home/debxxxxxx/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(100): call_user_func()

What command should I use?

wordpressfan commented 5 months ago

Related ticket: https://secure.helpscout.net/conversation/2609641597/494058/

saranshj4 commented 5 months ago

https://secure.helpscout.net/conversation/2605674745/493178/

saranshj4 commented 5 months ago

https://wordpress.org/support/topic/wp-cli-generate-missing-nextgen-not-working/

saranshj4 commented 3 months ago

https://secure.helpscout.net/conversation/2685771449