Title: hook &#8216;webpc_convert_paths&#8217; not working in WP CLI
Last modified: September 26, 2021

---

# hook ‘webpc_convert_paths’ not working in WP CLI

 *  Resolved [Josef Kuba](https://wordpress.org/support/users/kubajosef/)
 * (@kubajosef)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/hook-webpc_convert_paths-not-working-in-wp-cli/)
 * Call do_action(‘webpc_convert_paths’, $paths) through WP CLI;
    Unfortunately,
   the wepb picture has not been converted.
 * Then, I found The $output_formats variable is an empty array, in file LibraryMethodAbstract.
   php 18 line.
    While I actually chose webp format in the settings page.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Mateusz Gbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/)
 * (@mateuszgbiorczyk)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/hook-webpc_convert_paths-not-working-in-wp-cli/#post-14910054)
 * Hello [@kubajosef](https://wordpress.org/support/users/kubajosef/),
 * Thanks for your message.
 * How exactly do you use it? Please describe step by step how I can repeat the 
   problem that you have.
 * Best,
    Mateusz
 *  Thread Starter [Josef Kuba](https://wordpress.org/support/users/kubajosef/)
 * (@kubajosef)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/hook-webpc_convert_paths-not-working-in-wp-cli/#post-14910116)
 * Hello, [@mateuszgbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/)
 * 1. this is my WP CLI code [https://take.ms/bVZYi](https://take.ms/bVZYi)
    2. 
   then I debug in plugin code [https://take.ms/QO3Lj](https://take.ms/QO3Lj) 3.
   then I got this result [https://take.ms/2hw5q](https://take.ms/2hw5q) 4. In plugin
   setting page, I select webp [https://take.ms/cZFuk](https://take.ms/cZFuk)
 * If you need any other information, please tell me.
 *  Plugin Author [Mateusz Gbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/)
 * (@mateuszgbiorczyk)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/hook-webpc_convert_paths-not-working-in-wp-cli/#post-14910145)
 * [@kubajosef](https://wordpress.org/support/users/kubajosef/) Are you sure WP-
   CLI uses the same PHP configuration as your website? The Gd library is probably
   installed on your server, but it does not support the WebP format. [The plugin FAQ](https://wordpress.org/plugins/webp-converter-for-media/faq/)
   describes the requirements that the server must meet.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘hook ‘webpc_convert_paths’ not working in WP CLI’ is closed to new replies.

 * ![](https://ps.w.org/webp-converter-for-media/assets/icon-256x256.png?rev=2636288)
 * [Converter for Media - Optimize images | Convert WebP & AVIF](https://wordpress.org/plugins/webp-converter-for-media/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/webp-converter-for-media/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/webp-converter-for-media/)
 * [Active Topics](https://wordpress.org/support/plugin/webp-converter-for-media/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/webp-converter-for-media/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/webp-converter-for-media/reviews/)

## Tags

 * [cli](https://wordpress.org/support/topic-tag/cli/)
 * [webp](https://wordpress.org/support/topic-tag/webp/)

 * 3 replies
 * 2 participants
 * Last reply from: [Mateusz Gbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/hook-webpc_convert_paths-not-working-in-wp-cli/#post-14910145)
 * Status: resolved