Skip to main content

Command Palette

Search for a command to run...

What is ICO?

Updated
2 min read
What is ICO?
A
Abbey Perini is many things - a metro Atlanta native, person of many hobbies, full-stack web developer, accessibility advocate, international speaker, and technical writer with ✨over 500,000 views.✨ She's full-stack in the truest sense - give her a problem and she'll figure it out. She's happiest problem solving in the front-end, back-end, and all the APIs and microservices in between. Passionate about accessibility, she's worked in Vue, React, and even AngularJS (2013). She's spent her development career rectifying tech debt in existing codebases.

I didn't even know about this image file format until I went to make my first favicon. What's the deal with ICO?

ICO

Introduced in Microsoft Windows 1.0, the ICO file format was intended for app icons. (MacOS uses the ICNS file format for icons. Windows also allows you to use CUR files, which are meant for non-animated cursors.) Originally 32 x 32 pixels and monochrome, color support wasn't added until Microsoft Windows 3.0. As time went on more color, size, and feature options, like shadows, were added. These days, ICO files can be 256 x 256 pixels and contain 24 bits of colors and 8 bits of transparency.

Windows does recommend images that are 256 x 256 pixels be compressed PNGs to save space, which highlights the unique attribute of a file type like ICO - it's actually several images in either BMP or PNG format. An ICO file contains a directory called ICONDIR that lists the images within it and information like their file size, height, width, and colors. I've covered PNG in depth before, but BMP is the bitmap image format. Before Microsoft Windows 3.0, devices needed a device-independent format for transferring images, and BMP?redirectedfrom=MSDN) was the solution.

As a result, ICO is a file format that is used for situations in which machines will need to pick the optimal image from a group of images based on requirements like size. Raster images like BMP and PNG can only scale so far, so when you need multiple options in one file, reach for ICO or similar formats.

ICO files have native support on both Mac and Windows, and it looks like you should be able to open and create them with most image viewing and editing software. There are so many ways to convert images to ICO format, I can't even list them all here. I cannot overemphasize how many free ICO generators exist. You can also use tools like GIMP and Photoshop with a plugin. Combining Inkscape with ImageMagick allows you to create ICO files in the terminal. You can even convert JPEGs to ICO in paint in like 4 clicks.

Conclusion

Sure ICO's cool, makes sense for app icons, and has a lot of support, but how does it relate to web development? Check out the sister blog to this article, What are Favicons?

Images

Part 6 of 7

When I sat down to write about my Shiba Inu SVGs, out came a tutorial for SVGs in React, and an article demystifying sourcing images for your website. Additional image tutorials will be added here.

Up next

What are Favicons?

I mentioned <link rel="icon" type="image/x-icon" href="/images/favicon.ico"> as part of webpage SEO in Semantic HTML: What, Why, and How. Someone asked a great question - why does the MIME type in the <link> tag type="" attribute have to be image/x-i...

More from this blog

A

Abbey Perini Codes

85 posts

Passionate about accessibility, Abbey's worked in Vue, React, and even AngularJS (2013). She's happiest problem solving in the front-end, back-end, and all the APIs and microservices in between.