Last updated

Generate Tauri App Icons

Mirrored from iblai/vibe Β· skills/ship/iblai-vibe-iconography/SKILL.md. This page is generated β€” edit it in the repository, not here.

Generate all required icon sizes for Tauri desktop, iOS, Windows MSIX, and macOS builds from a single source image.

The default ibl.ai icon set (every size below) is bundled at iblai-vibe-ops-build/assets/icons/ β€” copy it into src-tauri/icons/ as a starting point, or regenerate from your own logo with the commands here.


Quick Start

# Option A β€” Tauri's built-in (standard desktop/mobile icons, no MSIX)
# Requires @tauri-apps/cli + Rust toolchain:
pnpm exec tauri icon path/to/logo.png

# Option B β€” ImageMagick (the full set INCLUDING the MSIX logos below)
# Requires `convert`; one resize per target size, e.g.:
for s in 32x32 128x128 256x256; do \
  convert path/to/logo.png -resize $s -gravity center -background none \
    -extent $s -alpha on PNG32:src-tauri/icons/$s.png; done

Both write to src-tauri/icons/, overwriting existing files. For the complete MSIX size list plus the multi-resolution .ico / .icns recipe, see /iblai-vibe-ops-build β†’ tauri-commands.


Source Image Requirements

  • Format: PNG or SVG
  • Shape: Square recommended (1:1 aspect ratio)
  • Size: Minimum 512x512 pixels for best quality at all output sizes
  • Non-square images: Centered on a transparent square canvas (letterboxed)

ImageMagick Installation

Required for the ImageMagick path (the full MSIX set). Not needed for pnpm exec tauri icon.

PlatformCommand
macOSbrew install imagemagick
Ubuntu/Debiansudo apt install imagemagick
Arch Linuxsudo pacman -S imagemagick
Fedora/RHELsudo dnf install ImageMagick
Windowswinget install ImageMagick.ImageMagick

If ImageMagick is not installed, use pnpm exec tauri icon (standard set, no MSIX logos).


Generated Icon Files

All icons are written to src-tauri/icons/:

Tauri Bundle Icons (referenced in tauri.conf.json)

FileSizeUsed by
32x32.png32x32Taskbar, file explorer
128x128.png128x128App launcher
128x128@2x.png256x256macOS HiDPI (Retina)
icon.png256x256Fallback / source
icon.ico16+32+48+256Windows executable icon
icon.icns128x128macOS app bundle

MSIX Icons (referenced in AppxManifest.xml)

FileSizeUsed by
StoreLogo.png50x50Microsoft Store listing
Square44x44Logo.png44x44Taskbar
Square71x71Logo.png71x71Start menu (small)
Square150x150Logo.png150x150Start menu (medium)
Square310x310Logo.png310x310Start menu (large)
Wide310x150Logo.png310x150Start menu (wide tile)

Comparison: ImageMagick vs tauri icon

FeatureImageMagick (convert)pnpm exec tauri icon
Tauri bundle icons (PNG, ICO, ICNS)YesYes
MSIX icons (StoreLogo, Square*, Wide*)YesNo
Multi-resolution ICOYes (16+32+48+256)Yes
macOS ICNSYesYes
RequiresImageMagick (convert)@tauri-apps/cli + Rust
Transparent backgroundAlwaysDepends on source
Non-square handlingCenters on transparent canvasResizes/crops

Recommendation: Use ImageMagick if you plan to build MSIX packages (Windows Store / enterprise). Use pnpm exec tauri icon if you only need standard desktop builds (NSIS, MSI, DMG, AppImage).


Default Icons

Generated apps ship with ibl.ai logo icons as defaults. Replace them with your own logo at any time:

pnpm exec tauri icon my-company-logo.png        # standard set
# (+ the ImageMagick step from Quick Start for the MSIX logos)

Regenerating After Logo Change

Simply re-run with the new source image:

pnpm exec tauri icon path/to/new-logo.png       # standard set
# (+ the ImageMagick step from Quick Start for the MSIX logos)

All icons in src-tauri/icons/ are overwritten. Commit the updated icons.


Troubleshooting

"Icon is not RGBA"

Tauri requires RGBA PNGs (with alpha channel for transparency). The ImageMagick recipe always produces RGBA output (PNG32: + -alpha on). If using a different tool, verify your PNGs:

# Check format
file src-tauri/icons/icon.png
# Should show: PNG image data, 256 x 256, 8-bit/color RGBA

# Convert RGB to RGBA with ImageMagick
convert icon.png -alpha on icon-rgba.png

Icons look small / too much padding

Non-square source images are centered on a transparent canvas, which can leave large borders at small sizes. For best results, use a square source image (1:1 aspect ratio) at 512x512 or larger.

"convert: not found" or "command not found"

Install ImageMagick for your platform (see table above), or use Tauri's built-in icon generator instead:

pnpm exec tauri icon path/to/logo.png

Icons not updating in the built app

After regenerating icons, rebuild the Tauri app:

pnpm exec tauri build
# or for MSIX:
pnpm tauri:build:msix

The old icons may be cached in src-tauri/target/. To force a clean build:

rm -rf src-tauri/target
pnpm exec tauri build

Copyright Β© ibl.ai | support@iblai.zendesk.com