Go to opt
directory and download latest version of imagemagick
cd /opt
sudo wget http://www.imagemagick.org/download/ImageMagick.tar.gz
Install webp lib dev library. This is mandatory othwerwise imagemagick won't include webp delegator.
Older version of libwebp-dev
raises undefined reference to WebPMemoryWriterClear
exception. You can manually install from here