title: Cant save webp format with imagick
body: <p>Im developing a panel in which Im uploading a jpg, it copies it, resizes it, saves another jpg and now I want also to be able to create a copy but using webp extension.</p>
  
  <p>Ive checked everywhere and couldnt find anyone with the same problem.
  Im running cPanel on CentOS
  cPanel > Version: ImageMagick 6.9.10-68 Q16 x86_64 2020-04-01</p>
  
  <pre><code>$imagick = new \Imagick($targetJpg); 
  $imagick-&gt;writeImage('webp:'.$targetWebp);
  </code></pre>
  
  <p><strong>I was getting this error</strong></p>
  
  <blockquote>
    <p>Fatal error: Uncaught ImagickException: delegate failed `'cwebp'
    -quiet %Q '%i' -o '%o'' @ error/delegate.c/InvokeDelegate/1928 in /...dirs.../pic-upload.php:108 Stack trace: #0
    /...dirs.../pic-upload.php(108):
    Imagick->writeimage('webp:../images/...') #1</p>
  </blockquote>
  
  <p>=========================================================</p>
  
  <p>In my local machine, OSX, using Mamp, that was solved with @MarkSetchell help.</p>
  
  <p>On OSX > Terminal
  type: cwebp -version
  webp 1.1.0</p>
  
  <p>type: type cwebp
  cwebp is hashed (/usr/local/bin/cwebp)</p>
  
  <p>Marks <strong>solution</strong> > Worked!  :)
  On macOS, your cwebp seems to be the homebrew one in /usr/local/bin, so I would suggest you find your Imagick config file called delegates.xml and edit it so that where it says 'cwebp' -quiet -q %Q '%I'... it becomes '/usr/local/bin/cwebp' -quiet -q...</p>
  
  <p>=========================================================</p>
  
  <p>In CentOS cPanel</p>
  
  <p>Neither cwebp or dwebp was installed. This was due to the package libwebp-tools not being installed.</p>
  
  <p>I installed them and checked - results:
  [root@server:/]$ whereis cwebp
  cwebp: /usr/bin/cwebp /usr/share/man/man1/cwebp.1.gz
  [root@server:/]$ whereis dwebp
  dwebp: /usr/bin/dwebp /usr/share/man/man1/dwebp.1.gz</p>
  
  <p><strong>Everything working now!</strong>
  Hope this is useful for someone else.
  Thanks for the Mark and Chris for the help</p>