Skip to content
F

file-icon

Get the icon of a file or app as a PNG image (macOS)

by sindresorhusFree

#921in UI Libraries
0In stores

Description

file-icon is a macOS library that returns the icon of a file or app as a PNG image. You can pass it an app name, bundle identifier, process…

Highlights

  • Get file and app icons as PNG
  • Accepts app names, bundle IDs, PIDs or paths
  • Batch several icons in one call
  • Size option up to 1024 pixels
  • Command-line companion package

Ratings & Reviews

No ratings yet

Be the first to rate file-icon.

People also visit

M

MacIconChanger

Transform your Mac, one icon at a time

Design
Launch
P

png2icons

Create Apple ICNS and Microsoft ICO files from PNG

UI Libraries
Launch
I

ios-icon-gen

Generate iOS app icons as PNG imagesets for Xcode asset catalogs

AI Skills
Get
I

Icons

Generate macOS app icons using AI

AI
Launch
I

Image2icon

Create and personalize icons from your pictures. ![Freeware][Freeware Icon]

Design
Launch
A

appicon

Quickly generate app icons in different sizes for your IOS

Design
Launch

file-icon FAQ

What does file-icon do?

It returns the icon of a file or application as a PNG image, either as a buffer or written to a file.

Which macOS versions does it support?

macOS 10.10 or later. On macOS 10.13 or earlier, the Swift runtime support libraries must be downloaded separately.

What sizes can I get?

The size option sets the icon size. The default and the maximum are both 1024 pixels.

Can I get several icons at once?

Yes. Pass an array of inputs. With fileIconToFile you pass an array of destinations of the same length.

Is there a command-line version?

Yes. The README links to file-icon-cli, a CLI for this module.

What are the best file-icon alternatives?

Popular alternatives to file-icon include png2icons, file-icons-js and @wkovacs64/add-icon. See all file-icon alternatives

Developer Stuff

Badges