Script for generating optimised favicons from an SVG using open source tools. The code accompanies the post on open source favicon generation. If you have any questions, please drop a comment at the bottom of that page.
This script uses Inkscape, OptiPNG and Scour so you need these installed to run it.
On macOS, you can install them with Homebrew:
brew install inkscape optipng scour
Once you have the apps installed, just run the script:
sh optimised-favicon-generator.sh input-svg-file.svg
This creates the optimised favicon files:
output/apple-touch-icon.png
output/favicon.ico
output/icon.svg
output/icon-192.png
output/icon-512.png
which are the five favicon files needed for wide support in legacy and modern browsers. More details in the post mentioned above.
Feel free to jump into the Rodney Lab matrix chat room.