Skip to content

Instantly share code, notes, and snippets.

@dhurba87
Last active May 14, 2021 08:12
Show Gist options
  • Save dhurba87/9cc5a5371915e44896a0a9fed581d0e5 to your computer and use it in GitHub Desktop.
Save dhurba87/9cc5a5371915e44896a0a9fed581d0e5 to your computer and use it in GitHub Desktop.
Install imagemagick with webp support

Install imagemagick with webp support

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

sudo apt install libwebp-dev

Extract, make and install

sudo tar xvzf ImageMagick.tar.gz
cd ImageMagick-7.0.8-2
sudo touch configure
sudo ./configure
sudo make
sudo make install
sudo ldconfig /usr/local/lib
sudo make check

Now, check the imagemagick version

convert --version

Install libwebp package manually from source file. Original source

First, uninstall libwebp if its already installed on your device.

sudo apt remove libwebp-dev

Download and extract latest webp library

wget http://downloads.webmproject.org/releases/webp/libwebp-1.2.0.tar.gz
tar -xz libwebp-1.2.0.tar.gz
cd libwebp-1.2.0

Install libwebp by running the following commands

./configure --prefix=/usr           \
            --enable-libwebpmux     \
            --enable-libwebpdemux   \
            --enable-libwebpdecoder \
            --enable-libwebpextras  \
            --enable-swap-16bit-csp \
            --disable-static        &&
make

Now install from root user

sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment