I have ImageMagick 6.7.8-9 and cwebp and dwebp (libwebp, libwebp-devel) installed and working as expected from the command line.
I have php7.2 installed from webtatic.
the problem I'm facing is that php imagick is not wrking with webp extension (other formats are working fine) here's what I get when I try Imagick: Fatal error: Uncaught ImagickException: Unable to set image format in .... : Imagick->setimageformat('webp')
please help me, I googled a lot, stackoverflow has nothing regarding this issue.. any clue, guidance, answer will be apreciated, thanks in advance
Don't use Imagick->setimageformat('webp')
use the following syntax instead:
$imagick = new \Imagick('/tmp/foo.jpg');
$imagick->writeImage('webp:/tmp/foo.webp');
That should do the trick for you ;-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With