For anyone wishing to use webshot and related tools on macOS here's how I got it working:
- Installed phantomjs and created a link to phantomjs in /usr/local/bin
- Installed libpng from homebrew (do this before compiling GraphicsMagick)
- Downloaded and compiled source for GraphicsMagick
- Installed GraphicsMagick
- Downloaded and compiled source for optipng
- Installed optipng
- Installed webshot R package
Notes: GraphicsMagick and optipng are available from homebrew; I wanted to build to learn more. GraphicsMagick requires add-ons in order to process specific image formats (e.g. libpng for png). The install page for GM lists the tools needed for each format. You can run webshot without GraphicsMagick if you don't want to use the resize() function; likewise you can run it without optipng if you don't want to use shrink().
Finally: webshot is a great package. It provides an easy yet flexible way to make screenshots of web pages and shiny apps.