I have created a favicon.ico file that contains three sizes of .png icon sizes, 16px, 32px, and 64px.
In my Mac Finder, I have their sizes at 339b, 1kb, and 4kb respectively after optimizing them using ImageOptim. So let's maybe round up to 6kb?
However, when I run this ImageMagick command:
convert 16.png 32.png 64.png myfav.ico
The resulting .ico file is 22kb!
This is a pretty large file and unexpected.
What did I do wrong? What can I do to make it smaller (if anything)?
The ico file itself is not a compressed one.
You can gzip it and you will see that the gzipped size will be lesser than the summation of the sizes the 3 png files. ico files are most frequently gzipped (using apache, nginx and so on) before being used to reduce the size.
So, the reason they are so big is because the compression algorithm is weak.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With