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 scourOnce you have the apps installed, just run the script:
sh optimised-favicon-generator.sh input-svg-file.svgThis creates the optimised favicon files:
output/apple-touch-icon.pngoutput/favicon.icooutput/icon.svgoutput/icon-192.pngoutput/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.