Small page I’ve had for years that I improved heavily with SVG versions this past week. It is just a collection of all countries’ flags in SVG and PNG. Often it is necessary to show flags in apps and on websites to graphically indicate where a user is from, but it is hard to find an easy-to-use and high-quality database of the flags. This aims to be that.

I recommend using svgexport and imagemin-cli to convert them to PNGs to suit your needs.

Simply install it with npm.

npm install svgexport imagemin-cli -g

To render PNGs with a width of 1000px run:

for file in *.svg; do svgexport $file "`basename $file svg`png" pad 1000: ; done
imagemin *.png ../compressed-pngs/
rm *.png

And just replace the 1000: with the width you desire (remember the :)