Last Updated: January 06, 2019
· skyzyx

Install WebP CLI tools on Mac/Linux

Homebrew has a very incomplete installation of WebP binaries. This is something you can add to your project Makefile for compiling WebP on Mac/Linux. You will need the Xcode CLI Tools (not all of Xcode itself), and install Homebrew so that you can do:

brew install cmake wget

Here is the Makefile entry:


.PHONY: build-webp
    wget$(WEBP_VERSION).tar.gz -O /tmp/libwebp-$(WEBP_VERSION).tar.gz
    tar -C /tmp -zxvf /tmp/libwebp-$(WEBP_VERSION).tar.gz
    mkdir -p /tmp/libwebp-$(WEBP_VERSION)/build
    cd /tmp/libwebp-$(WEBP_VERSION)/build && \
        make && make install

This will give you: cwebp, dwebp, get_disto, gif2webp, img2webp, vwebp, webp_quality, webpinfo, webpmux.

You can find the latest release versions at