-* Install libxml2: `brew install libxml2 --with-xml2-config`
-* If you want to run the tests, you need `phantomjs` as well: `brew install phantomjs`
-* Install Bundler: `gem install bundler`
+* Install libxml2: `brew install libxml2`
+* Install libgd: `brew install gd`
+* Install Yarn: `brew install yarn`
+* Install pngcrush: `brew install pngcrush`
+* Install optipng: `brew install optipng`
+* Install pngquant: `brew install pngquant`
+* Install jhead: `brew install jhead`
+* Install jpegoptim: `brew install jpegoptim`
+* Install gifsicle: `brew install gifsicle`
+* Install svgo: `brew install svgo`
+* Install Bundler: `gem install bundler` (you might need to `sudo gem install bundler` if you get an error about permissions)
+
+You will need to tell `bundler` that `libxml2` is installed in a Homebrew location. If it uses the system-installed one then you will get errors installing the `libxml-ruby` gem later on.
+
+```
+bundle config build.libxml-ruby --with-xml2-config=/usr/local/opt/libxml2/bin/xml2-config
+```
+
+If you want to run the tests, you need `phantomjs` as well:
+
+```
+brew tap homebrew/cask
+brew cask install phantomjs
+```