If your packaged Electron app still shows the default Electron logo, its native bundle icon has not been configured. Creating an electron app icon from favicon files requires platform assets; the page resource declared with rel='icon' is separate from an installed app's icon ([HTML Standard](https://html.spec.whatwg.org/multipage/links.html#rel-icon)).
Prerequisites
- An Electron project,
electron-builder, and ImageMagick available on your PATH.
- A square SVG or the largest PNG favicon available. Do not enlarge a 16-pixel raster and expect sharpness.
- For the macOS commands, open a macOS shell with
sips and iconutil.
If the source is missing, see How to Download a Favicon from Any Website. Mzu favicondl can convert it to PNG and ICO.
Create an Electron app icon from favicon files
- Create a 1024-pixel master. Keep the artwork centered on a transparent square canvas:
magick -background none favicon.svg -resize '1024x1024>' -gravity center -extent 1024x1024 icon.png
Replace favicon.svg with your file. Prefer vector artwork; redraw a tiny raster before export.
- Build a multi-resolution ICO. Renaming a PNG does not create one:
magick -background none favicon.svg -define icon:auto-resize=256,128,64,48,32,24,16 icon.ico
Substitute the actual input and keep icon.png beside icon.ico.
- Create the macOS ICNS on macOS from that master:
mkdir -p icon.iconset
sips -z 16 16 icon.png --out icon.iconset/icon_16x16.png
sips -z 32 32 icon.png --out icon.iconset/[email protected]
sips -z 32 32 icon.png --out icon.iconset/icon_32x32.png
sips -z 64 64 icon.png --out icon.iconset/[email protected]
sips -z 128 128 icon.png --out icon.iconset/icon_128x128.png
sips -z 256 256 icon.png --out icon.iconset/[email protected]
sips -z 256 256 icon.png --out icon.iconset/icon_256x256.png
sips -z 512 512 icon.png --out icon.iconset/[email protected]
sips -z 512 512 icon.png --out icon.iconset/icon_512x512.png
cp icon.png icon.iconset/[email protected]
iconutil -c icns icon.iconset -o icon.icns
This produces a native ICNS container.
- Point electron-builder at each asset in
electron-builder.yml:win:
icon: build/icon.ico
mac:
icon: build/icon.icns
linux:
icon: build/icon.png
Copy all three files into build/. Run npx electron-builder and inspect the package for that platform.
Common pitfalls
- Using only a browser favicon. A tab favicon does not replace the bundle icon. See Favicon and App Icon Difference for the design distinction.
- Renaming PNG to ICO. The extension does not create the multi-size container; use the conversion command above.
- Losing the mark when cropped. Keep important shapes away from edges and test the smallest rendering. Native icons need simpler artwork than a full logo.
- Using mismatched paths. YAML paths are relative to the project configuration, and Linux paths are case-sensitive. Confirm each file exists before building.
Conclusion
Use the favicon as source artwork, export platform-native containers, and let the packaging tool place the correct icon in each application bundle. Mzu favicondl handles favicon-to-PNG and ICO preparation so you can focus on a clean mark and a reproducible Electron build.
パッケージングしたElectron appがまだ既定のElectron logoを表示している場合は、アプリのネイティブバンドルアイコンが未設定です。faviconファイルからelectron app iconを作成するには、platformごとのassetが必要です。rel='icon'で宣言したページリソースは、インストール済みappのiconとは別のものです([HTML Standard](https://html.spec.whatwg.org/multipage/links.html#rel-icon))。
前提条件
- Electron project、
electron-builderを用意し、ImageMagickをPATH上で利用できるようにしてください。
- 正方形のSVG、または利用可能な最大のPNG faviconを用意してください。16ピクセルのrasterを拡大しても、鮮明な画像は期待できません。
- macOSのcommandを実行する場合は、
sipsとiconutilが使えるmacOSのshellを開いてください。
元ファイルがない場合は、How to Download a Favicon from Any Websiteを参照してください。Mzu favicondlを使えば、PNGとICOに変換できます。
faviconファイルからelectron app iconを作成する
- 1024ピクセルのマスターを作成する。 アートワークを透明な正方形キャンバスの中央に配置します。
magick -background none favicon.svg -resize '1024x1024>' -gravity center -extent 1024x1024 icon.png
favicon.svgを実際のファイルに置き換えてください。vector artworkを優先し、小さなrasterは書き直してからexportしてください。
- 複数解像度のICOを作成する。 PNGのファイル名を変更してもICOは作成できません。
magick -background none favicon.svg -define icon:auto-resize=256,128,64,48,32,24,16 icon.ico
実際の入力ファイルに置き換えてください。また、icon.pngをicon.icoと同じディレクトリに置いてください。
- macOS上でマスターからmacOS向けICNSを作成する:
mkdir -p icon.iconset
sips -z 16 16 icon.png --out icon.iconset/icon_16x16.png
sips -z 32 32 icon.png --out icon.iconset/[email protected]
sips -z 32 32 icon.png --out icon.iconset/icon_32x32.png
sips -z 64 64 icon.png --out icon.iconset/[email protected]
sips -z 128 128 icon.png --out icon.iconset/icon_128x128.png
sips -z 256 256 icon.png --out icon.iconset/[email protected]
sips -z 256 256 icon.png --out icon.iconset/icon_256x256.png
sips -z 512 512 icon.png --out icon.iconset/[email protected]
sips -z 512 512 icon.png --out icon.iconset/icon_512x512.png
cp icon.png icon.iconset/[email protected]
iconutil -c icns icon.iconset -o icon.icns
これにより、ネイティブICNSコンテナが生成されます。
- electron-builderに各assetを指定する。
electron-builder.ymlで次のように設定します。win:
icon: build/icon.ico
mac:
icon: build/icon.icns
linux:
icon: build/icon.png
3つのファイルをすべてbuild/にコピーしてください。npx electron-builderを実行し、対象platformのpackageを確認してください。
よくある落とし穴
- ブラウザの favicon だけを使う。 タブの favicon は、アプリケーションのバンドルアイコンを置き換えるものではありません。デザインの区别については、Favicon と App Icon の違いを参照してください。
- PNG の拡張子を ICO に変更する。 拡張子を変更しても、複数サイズのコンテナは作成されません。上記の変換コマンドを使用してください。
- クロップによってマークが失われる。 重要な形状は端から離して配置し、最小の表示サイズでテストしてください。ネイティブアイコンには、フルロゴよりもシンプルなアートワークが必要です。
- パスの不一致。 YAML 内のパスはプロジェクト設定を基準とした相対パスであり、Linux のパスは大文字と小文字を区別します。ビルド前に、すべてのファイルが存在することを確認してください。
まとめ
favicon を元のアートワークとして使用し、各プラットフォームのネイティブ形式に書き出したうえで、 packaging tool が正しいアイコンを各アプリケーションのバンドルに配置するようにしてください。Mzu favicondlは favicon から PNG および ICO への準備を処理するため、mast 清潔で再現性の高い Electron ビルドに集中できます。
패키징된 Electron 앱에 기본 Electron 로고가 계속 보인다면 native bundle 아이콘이 아직 설정되지 않은 것입니다. favicon 파일로 Electron 앱 아이콘 만들기에는 플랫폼별 asset이 필요합니다. rel='icon'으로 선언한 페이지 resource는 설치된 앱의 아이콘과 별개입니다([HTML Standard](https://html.spec.whatwg.org/multipage/links.html#rel-icon)).
사전 준비 사항
- Electron 프로젝트와
electron-builder, ImageMagick가 PATH에서 사용 가능해야 합니다.
- 정사각형 SVG 또는 사용할 수 있는 가장 큰 PNG favicon이 필요합니다. 16-pixel raster를 확대해 선명해질 것을 기대하면 안 됩니다.
- macOS 명령어를 실행하려면
sips와 iconutil을 사용할 수 있는 macOS shell을 여세요.
원본 파일이 없다면 다음 글을 참고하세요: How to Download a Favicon from Any Website. Mzu favicondl을 사용해 PNG와 ICO로 변환할 수 있습니다.
favicon 파일로 Electron 앱 아이콘 만들기
- 1024-pixel master를 만듭니다. artwork는 투명한 정사각형 canvas 중앙에 배치하세요:
magick -background none favicon.svg -resize '1024x1024>' -gravity center -extent 1024x1024 icon.png
favicon.svg를 실제 파일로 교체하세요. vector artwork를 우선 사용하고, 아주 작은 raster는 export 전에 다시 그리세요.
- multi-resolution ICO를 만듭니다. PNG 파일명만 바꾸면 ICO가 만들어지지 않습니다:
magick -background none favicon.svg -define icon:auto-resize=256,128,64,48,32,24,16 icon.ico
실제 입력 파일명으로 바꾸고 icon.png와 icon.ico를 같은 위치에 두세요.
- macOS에서 앞서 만든 master를 사용해 macOS ICNS를 만듭니다:
mkdir -p icon.iconset
sips -z 16 16 icon.png --out icon.iconset/icon_16x16.png
sips -z 32 32 icon.png --out icon.iconset/[email protected]
sips -z 32 32 icon.png --out icon.iconset/icon_32x32.png
sips -z 64 64 icon.png --out icon.iconset/[email protected]
sips -z 128 128 icon.png --out icon.iconset/icon_128x128.png
sips -z 256 256 icon.png --out icon.iconset/[email protected]
sips -z 256 256 icon.png --out icon.iconset/icon_256x256.png
sips -z 512 512 icon.png --out icon.iconset/[email protected]
sips -z 512 512 icon.png --out icon.iconset/icon_512x512.png
cp icon.png icon.iconset/[email protected]
iconutil -c icns icon.iconset -o icon.icns
이 과정으로 native ICNS container가 만들어집니다.
electron-builder.yml에서 각 asset을 지정해 electron-builder가 참조하도록 설정합니다:win:
icon: build/icon.ico
mac:
icon: build/icon.icns
linux:
icon: build/icon.png
세 파일을 모두 build/에 복사하세요. npx electron-builder를 실행한 뒤 해당 플랫폼의 package를 확인하세요.
자주 부딪히는 문제
- 브라우저 favicon만 사용하는 경우. 탭에 표시되는 favicon은 bundle icon을 대신할 수 없습니다. 디자인 측면의 차이는 Favicon and App Icon Difference에서 확인하세요.
- PNG의 확장자만 ICO로 바꾸는 경우. 확장자만 변경해서는 multi-size container가 만들어지지 않습니다. 앞서 설명한 변환 명령을 사용하세요.
- crop하면서 mark가 잘리는 경우. 중요한 형태는 가장자리에서 멀리 두세요. 가장 작은 크기로 rendering했을 때도 확인해야 합니다. Native icon은 full logo보다 단순한 artwork가 필요합니다.
- path가 서로 맞지 않는 경우. YAML path는 project configuration을 기준으로 한 상대 경로이며, Linux path는 대소문자를 구분합니다. build 전에 각 file이 존재하는지 확인하세요.
결론
favicon을 source artwork로 사용하고, 플랫폼별 native container를 export한 다음, packaging tool이 각 application bundle에 올바른 icon을 배치하도록 하세요. Mzu favicondl은 favicon-to-PNG 변환과 ICO 준비를 지원하므로, 깔끔한 mark와 재현 가능한 Electron build에 집중할 수 있습니다.
Si tu app Electron empaquetada sigue mostrando el logotipo predeterminado de Electron, el icono nativo del bundle no está configurado. Crear un icono de aplicación Electron a partir de archivos favicon requiere recursos para cada plataforma; el recurso de la página declarado con rel='icon' es distinto del icono de la app instalada ([HTML Standard](https://html.spec.whatwg.org/multipage/links.html#rel-icon)).
Prerrequisitos
- Un proyecto Electron,
electron-builder e ImageMagick disponibles en tu PATH.
- Un SVG cuadrado o el favicon PNG de mayor tamaño disponible. No amplíes una imagen rasterizada de 16 píxeles y esperes que conserve la nitidez.
- Para los comandos de macOS, abre un shell de macOS con
sips e iconutil.
Si falta el archivo de origen, consulta Cómo descargar un favicon de cualquier sitio web. Mzu favicondl puede convertirlo a PNG e ICO.
Crear un icono de aplicación Electron a partir de archivos favicon
- Crea una imagen maestra de 1024 píxeles. Mantén la ilustración centrada en un lienzo cuadrado transparente:
magick -background none favicon.svg -resize '1024x1024>' -gravity center -extent 1024x1024 icon.png
Sustituye favicon.svg por tu archivo. Prefiere el arte vectorial; vuelve a dibujar una imagen rasterizada muy pequeña antes de exportarla.
- Genera un ICO multirresolución. Renombrar un PNG no crea un ICO:
magick -background none favicon.svg -define icon:auto-resize=256,128,64,48,32,24,16 icon.ico
Sustituye la entrada favicon.svg por tu archivo real y deja icon.png junto a icon.ico.
- Crea el ICNS nativo de macOS en macOS a partir de esa imagen maestra:
mkdir -p icon.iconset
sips -z 16 16 icon.png --out icon.iconset/icon_16x16.png
sips -z 32 32 icon.png --out icon.iconset/[email protected]
sips -z 32 32 icon.png --out icon.iconset/icon_32x32.png
sips -z 64 64 icon.png --out icon.iconset/[email protected]
sips -z 128 128 icon.png --out icon.iconset/icon_128x128.png
sips -z 256 256 icon.png --out icon.iconset/[email protected]
sips -z 256 256 icon.png --out icon.iconset/icon_256x256.png
sips -z 512 512 icon.png --out icon.iconset/[email protected]
sips -z 512 512 icon.png --out icon.iconset/icon_512x512.png
cp icon.png icon.iconset/[email protected]
iconutil -c icns icon.iconset -o icon.icns
Esto produce un contenedor ICNS nativo.
- Indica a electron-builder la ruta de cada asset en
electron-builder.yml:win:
icon: build/icon.ico
mac:
icon: build/icon.icns
linux:
icon: build/icon.png
Copia los tres archivos en build/. Ejecuta npx electron-builder y revisa el paquete de esa plataforma.
Errores comunes
- Usar únicamente el favicon del navegador. El favicon de una pestaña no sustituye al icono del paquete de la aplicación. Consulta la diferencia entre un favicon y un icono de aplicación para conocer las distintas consideraciones de diseño.
- Cambiar el nombre de un PNG a ICO. La extensión no crea el contenedor con varios tamaños; utiliza el comando de conversión indicado anteriormente.
- Perder la marca al recortarla. Mantén las formas importantes lejos de los bordes y prueba el tamaño de visualización más pequeño. Los iconos nativos necesitan una ilustración más sencilla que un logo completo.
- Usar rutas que no coinciden. Las rutas del YAML son relativas a la configuración del proyecto y, en Linux, distinguen entre mayúsculas y minúsculas. Confirma que todos los archivos existen antes de compilar.
Conclusión
Usa el favicon como arte fuente, exporta los contenedores nativos de cada plataforma y deja que la herramienta de empaquetado coloque el icono correcto en cada paquete de la aplicación. Mzu favicondl prepara la conversión del favicon a PNG y la generación del ICO para que puedas centrarte en una marca limpia y en una compilación reproducible de Electron.
Build a Native Electron Icon from Your Favicon
Download and convert your favicon, then prepare reliable PNG, ICO, and ICNS assets for Electron packaging.
Try It Free →