cwebp installed but not working?
-
I have installed the cwebp from this tutorial – https://www.tecmint.com/convert-images-to-webp-format-in-linux/
I added the cwebp to bash, so i can just type ‘cwebp’ to access it.
Still the plugin does not work, cwebp test shows:
Found no cwebp binaries in any common system locations. Tried executing supplied binary for Linux, but that failed too (same error)I created a php file to test.
shell_exec(‘cwebp 2>&1’) and exec(‘cwebp 2>&1’)
both outputs “sh: cwebp: command not found”
Two below commands work
shell_exec(‘/usr/libwebp-0.6.1-linux-x86-32/bin/cwebp 2>&1’)
exec(‘/usr/libwebp-0.6.1-linux-x86-32/bin/cwebp 2>&1’)Also if I add
putenv(‘PATH=/usr/libwebp-0.6.1-linux-x86-32/bin’);
before
shell_exec(‘cwebp 2>&1’) and exec(‘cwebp 2>&1’)
it works just fine.
So I tried adding
putenv(‘PATH=/usr/libwebp-0.6.1-linux-x86-32/bin’);
to the wp-config.php and running shell_exec(‘cwebp 2>&1’) in admin hook, which works, so I don’t understand why the plugin still don’t work?See image below
Could anyone help please?
- The topic ‘cwebp installed but not working?’ is closed to new replies.