Skip to content

Instantly share code, notes, and snippets.

@eonist
Created January 21, 2026 17:59
Show Gist options
  • Select an option

  • Save eonist/096c9c7bcc862eebb2b2a90b139a667a to your computer and use it in GitHub Desktop.

Select an option

Save eonist/096c9c7bcc862eebb2b2a90b139a667a to your computer and use it in GitHub Desktop.
tauri_icon.md

why am I getting this all the time? MacBookPro:omni-app-research eon$

MacBookPro:omni-app-research eon$ bun run tauri build $ node src-tauri/scripts/pretauri.mjs [pretauri] sidecar prepared: /Users/eon/omni-app-research/src-tauri/binaries/omni-aarch64-apple-darwin $ tauri build         Info Looking up installed tauri packages to check mismatched versions...      Running beforeBuildCommand bun run build $ tsc && vite build vite v5.4.21 building for production... ✓ 1921 modules transformed. dist/index.html                           0.60 kB │ gzip:   0.34 kB dist/preferences.html                     0.63 kB │ gzip:   0.34 kB dist/assets/preferences-BhwiuEEO.css      9.32 kB │ gzip:   2.12 kB dist/assets/theme-rIFm7AGX.css           36.45 kB │ gzip:   6.82 kB dist/assets/main-DKDoqrSE.css            95.51 kB │ gzip:  15.32 kB dist/assets/preferences-DSoXXweq.js     108.24 kB │ gzip:  37.63 kB dist/assets/theme-2WqVdH3k.js           204.84 kB │ gzip:  65.96 kB dist/assets/main-CXlwDu1l.js          1,723.46 kB │ gzip: 547.04 kB

(!) Some chunks are larger than 500 kB after minification. Consider:

  • Using dynamic import() to code-split the application
  • Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
  • Adjust chunk size limit for this warning via build.chunkSizeWarningLimit. ✓ built in 7.74s    Compiling objc2-exception-helper v0.1.1    Compiling ring v0.17.14    Compiling openssl-sys v0.9.111    Compiling libz-sys v1.1.23    Compiling omni-app v0.1.0 (/Users/eon/omni-app-research/src-tauri)    Compiling objc2 v0.6.3    Compiling libssh2-sys v0.3.1    Compiling rustls v0.23.36    Compiling rustls-webpki v0.103.9    Compiling objc2-core-foundation v0.3.2    Compiling block2 v0.6.2    Compiling objc2-javascript-core v0.3.2    Compiling dispatch2 v0.3.0    Compiling objc2-foundation v0.3.2    Compiling objc2-core-text v0.3.2    Compiling objc2-core-graphics v0.3.2    Compiling objc2-core-video v0.3.2    Compiling objc2-security v0.3.2    Compiling libgit2-sys v0.17.0+1.8.1    Compiling tokio-rustls v0.26.4    Compiling hyper-rustls v0.27.7    Compiling reqwest v0.12.28    Compiling octocrab v0.49.5    Compiling objc2-core-image v0.3.2    Compiling objc2-quartz-core v0.3.2    Compiling objc2-core-data v0.3.2    Compiling objc2-cloud-kit v0.3.2    Compiling objc2-app-kit v0.3.2    Compiling git2 v0.19.0    Compiling objc2-web-kit v0.3.2    Compiling tao v0.34.5    Compiling window-vibrancy v0.6.0    Compiling muda v0.17.1    Compiling objc2-osa-kit v0.3.2    Compiling rfd v0.16.0    Compiling osakit v0.3.1    Compiling tauri-runtime v2.9.2    Compiling wry v0.53.5    Compiling tauri-runtime-wry v2.9.3    Compiling tauri v2.9.5    Compiling tauri-plugin-fs v2.4.5    Compiling tauri-plugin-updater v2.9.0    Compiling tauri-plugin-shell v2.3.4    Compiling tauri-plugin-store v2.4.2    Compiling tauri-plugin-dialog v2.6.0 warning: function get_token is never used   --> src/github_auth.rs:90:8    | 90 | pub fn get_token() -> Result<Option, String> {    |        ^^^^^^^^^    |    = note: #[warn(dead_code)] (part of #[warn(unused)]) on by default

warning: function get_username is never used    --> src/github_auth.rs:128:8     | 128 | pub fn get_username() -> Result<Option, String> {     |        ^^^^^^^^^^^^

warning: omni-app (bin "omni-app") generated 2 warnings     Finished release profile [optimized] target(s) in 1m 58s        Built application at: /Users/eon/omni-app-research/src-tauri/target/release/omni-app     Bundling Omni.app (/Users/eon/omni-app-research/src-tauri/target/release/bundle/macos/Omni.app) failed to bundle project Failed to create app icon: The image format could not be determined        Error failed to bundle project Failed to create app icon: The image format could not be determined error: script "tauri" exited with code 1 MacBookPro:omni-app-research eon$

The error you're encountering is related to app icon creation during the Tauri bundling process. The build fails with:

Failed to create app icon: `The image format could not be determined`

Root Cause

Tauri cannot determine the format of your app icon file, which typically means the icon file is either missing, corrupted, or in an unsupported format.

Solutions

Check Your Icon Configuration

  1. Verify icon file exists and is valid
    • Open src-tauri/tauri.conf.json (or tauri.conf.json)
    • Look for the bundle.icon section
    • Ensure the specified icon path points to a valid image file
  2. Use the correct icon format
    • For macOS, Tauri needs a PNG file (typically 1024x1024px or 512x512px)
    • The path is usually something like: "icon": ["icons/icon.png"]
  3. Regenerate your icons
# Install tauri-cli if needed
cargo install tauri-cli

# Generate icons from a source PNG (1024x1024 recommended)
cargo tauri icon path/to/your-icon.png
  1. Manual icon setup
    • Place a valid PNG icon at src-tauri/icons/icon.png
    • Ensure it's at least 512x512px
    • Update your tauri.conf.json:
"bundle": {
  "icon": [
    "icons/32x32.png",
    "icons/128x128.png",
    "icons/128x128@2x.png",
    "icons/icon.icns",
    "icons/icon.png"
  ]
}
  1. Quick fix: If you just need to test the build, create a simple temporary icon:
    • Create any valid PNG file (minimum 512x512px)
    • Save it at the path specified in your tauri.conf.json

The build should succeed once Tauri can locate and properly read your icon file.


no mater what I do: MacBookPro:omni-app-research eon$ file src-tauri/icons/icon.icns

src-tauri/icons/icon.icns: Mac OS X icon, 162553 bytes, "ic14" type MacBookPro:omni-app-research eon$ bun run tauri build $ node src-tauri/scripts/pretauri.mjs [pretauri] sidecar prepared: /Users/eon/omni-app-research/src-tauri/binaries/omni-aarch64-apple-darwin $ tauri build         Info Looking up installed tauri packages to check mismatched versions...      Running beforeBuildCommand bun run build $ tsc && vite build vite v5.4.21 building for production... ✓ 1921 modules transformed. dist/index.html                           0.60 kB │ gzip:   0.33 kB dist/preferences.html                     0.63 kB │ gzip:   0.34 kB dist/assets/preferences-BhwiuEEO.css      9.32 kB │ gzip:   2.12 kB dist/assets/theme-rIFm7AGX.css           36.45 kB │ gzip:   6.82 kB dist/assets/main-DKDoqrSE.css            95.51 kB │ gzip:  15.32 kB dist/assets/preferences-BEOI5x3H.js     110.38 kB │ gzip:  38.98 kB dist/assets/theme--Rivg8AT.js           204.70 kB │ gzip:  65.93 kB dist/assets/main-DXC6GcwT.js          1,711.00 kB │ gzip: 541.48 kB

(!) Some chunks are larger than 500 kB after minification. Consider:

  • Using dynamic import() to code-split the application
  • Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
  • Adjust chunk size limit for this warning via build.chunkSizeWarningLimit. ✓ built in 8.10s    Compiling omni-app v0.1.0 (/Users/eon/omni-app-research/src-tauri) warning: function get_token is never used   --> src/github_auth.rs:90:8    | 90 | pub fn get_token() -> Result<Option, String> {    |        ^^^^^^^^^    |    = note: #[warn(dead_code)] (part of #[warn(unused)]) on by default

warning: function get_username is never used    --> src/github_auth.rs:128:8     | 128 | pub fn get_username() -> Result<Option, String> {     |        ^^^^^^^^^^^^

warning: omni-app (bin "omni-app") generated 2 warnings     Finished release profile [optimized] target(s) in 1m 28s        Built application at: /Users/eon/omni-app-research/src-tauri/target/release/omni-app     Bundling Omni.app (/Users/eon/omni-app-research/src-tauri/target/release/bundle/macos/Omni.app) failed to bundle project Failed to create app icon: The image format could not be determined        Error failed to bundle project Failed to create app icon: The image format could not be determined error: script "tauri" exited with code 1 MacBookPro:omni-app-research eon$

The issue is that Tauri's bundler requires PNG files in addition to the ICNS file, even though you have a valid .icns file. The bundler is specifically looking for PNG files during the macOS app icon creation process.

Solution

Your tauri.conf.json likely lists icon files including PNGs, but you may only have the .icns file. Here's how to fix it:

Option 1: Generate all required icons from ICNS

Extract PNGs from your existing ICNS file:

# Navigate to your icons directory
cd src-tauri/icons

# Extract the ICNS to iconset
mkdir icon.iconset
iconutil -c iconset -o icon.iconset icon.icns

# The iconset will contain PNGs that you can use
# Copy the needed sizes to your icons directory
cp icon.iconset/icon_512x512.png ./icon.png
cp icon.iconset/icon_32x32.png ./32x32.png
cp icon.iconset/icon_128x128.png ./128x128.png
cp icon.iconset/icon_256x256.png ./128x128@2x.png

Option 2: Use Tauri's icon command

If you have a source PNG (1024x1024 or 512x512), regenerate all icons:

# From your project root
cargo tauri icon path/to/source-icon.png

This will create all required formats (PNG files + ICNS + ICO) in src-tauri/icons/.12

Option 3: Check your tauri.conf.json

Ensure your configuration includes PNG files:3

"bundle": {
  "icon": [
    "icons/32x32.png",
    "icons/128x128.png",
    "icons/128x128@2x.png",
    "icons/icon.icns",
    "icons/icon.png"
  ]
}

The bundler needs these PNG files to exist at build time, even on macOS where ICNS is the primary format.24 567891011121314151617


I call this: # Install tauri-cli if needed

cargo install tauri-cli

Generate icons from a source PNG (1024x1024 recommended)

cargo tauri icon icon_1024.png

Perfect! You're on the right track. The command cargo tauri icon icon_1024.png should work to generate all the required icon files. Here's what you need to know:1819

Command Usage

The correct syntax is:2018

cargo tauri icon icon_1024.png

This will automatically generate all required icon formats and place them in src-tauri/icons/ including:

  • Multiple PNG sizes (32x32, 128x128, 128x128@2x, icon.png)
  • icon.icns (macOS)
  • icon.ico (Windows)

Requirements

Your source image (icon_1024.png) should be:

  • 1024x1024 pixels (recommended) or at least 512x512
  • PNG format with transparency
  • Located in your project root or specify the full path

After Running

Once the command completes successfully:

  1. Verify the files were created:
ls -la src-tauri/icons/
  1. Run your build again:
bun run tauri build

The "image format could not be determined" error should be resolved since all the PNG files that the bundler needs will now exist.19

If the command doesn't work, ensure tauri-cli is properly installed and in your PATH. You can verify with:

cargo tauri --version

21222324252627


Last login: Sun Jan 18 22:54:21 on ttys017

The default interactive shell is now zsh. To update your account to use zsh, please run chsh -s /bin/zsh. For more details, please visit https://support.apple.com/kb/HT208050. MacBookPro:omni-app-research eon$ ls -la src-tauri/icons/ total 648 drwxr-xr-x  22 eon  staff     704 Jan 18 22:08 . drwxr-xr-x  14 eon  staff     448 Jan 18 22:05 .. -rw-r--r--   1 eon  staff    4365 Jan 18 23:19 128x128.png -rw-r--r--   1 eon  staff   10308 Jan 18 23:19 128x128@2x.png -rw-r--r--   1 eon  staff     898 Jan 18 23:19 32x32.png -rw-r--r--   1 eon  staff    1935 Jan 18 23:19 64x64.png -rw-r--r--   1 eon  staff    3516 Jan 18 23:19 Square107x107Logo.png -rw-r--r--   1 eon  staff    4830 Jan 18 23:19 Square142x142Logo.png -rw-r--r--   1 eon  staff    5160 Jan 18 23:19 Square150x150Logo.png -rw-r--r--   1 eon  staff   11656 Jan 18 23:19 Square284x284Logo.png -rw-r--r--   1 eon  staff     801 Jan 18 23:19 Square30x30Logo.png -rw-r--r--   1 eon  staff   13072 Jan 18 23:19 Square310x310Logo.png -rw-r--r--   1 eon  staff    1257 Jan 18 23:19 Square44x44Logo.png -rw-r--r--   1 eon  staff    2208 Jan 18 23:19 Square71x71Logo.png -rw-r--r--   1 eon  staff    2905 Jan 18 23:19 Square89x89Logo.png -rw-r--r--   1 eon  staff    1458 Jan 18 23:19 StoreLogo.png drwxr-xr-x   9 eon  staff     288 Jan 18 22:08 android -rw-r--r--   1 eon  staff  162553 Jan 18 23:19 icon.icns -rw-r--r--   1 eon  staff   18928 Jan 18 23:19 icon.ico -rw-r--r--   1 eon  staff   29606 Jan 18 23:19 icon.png -rw-r--r--   1 eon  staff     189 Jan 17 05:13 icon.svg drwxr-xr-x  20 eon  staff     640 Jan 18 22:08 ios MacBookPro:omni-app-research eon$

Perfect! All your icon files are now properly generated (you can see they were all created at 23:19 today). You have:

  • All required PNG files (32x32, 128x128, 128x128@2x, icon.png, etc.)
  • icon.icns for macOS
  • icon.ico for Windows

Now try running your build command again:

bun run tauri build

The "image format could not be determined" error should be completely resolved now since the bundler has access to all the PNG files it needs. The icons were successfully generated just a few minutes ago, so your build should proceed past the icon bundling stage.

If you still encounter the same error, there might be an issue with your tauri.conf.json configuration. In that case, check that the bundle.icon array in your config file correctly references these icon paths (e.g., "icons/32x32.png", "icons/128x128.png", "icons/icon.icns", "icons/icon.png").


is there a command I can call to pre verify that all images are correct?

Unfortunately, Tauri doesn't have a dedicated command to pre-verify icons before building. However, you can use these approaches to validate your icons:

Manual Verification Methods

1. Check file formats with file command

file src-tauri/icons/*.png
file src-tauri/icons/icon.icns
file src-tauri/icons/icon.ico

This verifies each file is actually the format it claims to be.28

2. Check PNG validity with ImageMagick

# Install ImageMagick if needed: brew install imagemagick

# Verify all PNGs are valid
identify src-tauri/icons/*.png

This will show dimensions and confirm the images are valid.

3. Verify icon sizes

# Check dimensions of all PNGs
sips -g pixelWidth -g pixelHeight src-tauri/icons/*.png

4. Use tauri build --debug for verbose output

cargo tauri build --debug

This provides more detailed error messages during the bundling process.29

5. Quick validation script

You can create a simple script to check all required files exist:

#!/bin/bash
ICONS_DIR="src-tauri/icons"
REQUIRED_FILES=("32x32.png" "128x128.png" "128x128@2x.png" "icon.png" "icon.icns" "icon.ico")

for file in "${REQUIRED_FILES[@]}"; do
  if [ -f "$ICONS_DIR/$file" ]; then
    echo "$file exists"
    file "$ICONS_DIR/$file"
  else
    echo "$file missing"
  fi
done

Since your icons were just generated by cargo tauri icon, they should all be valid. The fastest way to verify everything works is simply to run bun run tauri build - it will fail quickly if there's still an icon issue.3031 323334353637


again!!! MacBookPro:omni-app-research eon$ bun run tauri build

$ node src-tauri/scripts/pretauri.mjs [pretauri] sidecar prepared: /Users/eon/omni-app-research/src-tauri/binaries/omni-aarch64-apple-darwin $ tauri build         Info Looking up installed tauri packages to check mismatched versions...      Running beforeBuildCommand bun run build $ tsc && vite build vite v5.4.21 building for production... ✓ 1921 modules transformed. dist/index.html                           0.60 kB │ gzip:   0.34 kB dist/preferences.html                     0.63 kB │ gzip:   0.34 kB dist/assets/preferences-BhwiuEEO.css      9.32 kB │ gzip:   2.12 kB dist/assets/theme-rIFm7AGX.css           36.45 kB │ gzip:   6.82 kB dist/assets/main-DKDoqrSE.css            95.51 kB │ gzip:  15.32 kB dist/assets/preferences-DFMDd01o.js     109.39 kB │ gzip:  38.74 kB dist/assets/theme-C5qQ9ClC.js           204.57 kB │ gzip:  65.80 kB dist/assets/main-Ddnt6VAl.js          1,714.09 kB │ gzip: 542.81 kB

(!) Some chunks are larger than 500 kB after minification. Consider:

  • Using dynamic import() to code-split the application
  • Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
  • Adjust chunk size limit for this warning via build.chunkSizeWarningLimit. ✓ built in 7.83s    Compiling omni-app v0.1.0 (/Users/eon/omni-app-research/src-tauri) warning: function get_token is never used   --> src/github_auth.rs:90:8    | 90 | pub fn get_token() -> Result<Option, String> {    |        ^^^^^^^^^    |    = note: #[warn(dead_code)] (part of #[warn(unused)]) on by default

warning: function get_username is never used    --> src/github_auth.rs:128:8     | 128 | pub fn get_username() -> Result<Option, String> {     |        ^^^^^^^^^^^^

warning: omni-app (bin "omni-app") generated 2 warnings     Finished release profile [optimized] target(s) in 1m 28s        Built application at: /Users/eon/omni-app-research/src-tauri/target/release/omni-app     Bundling Omni.app (/Users/eon/omni-app-research/src-tauri/target/release/bundle/macos/Omni.app) failed to bundle project Failed to create app icon: The image format could not be determined        Error failed to bundle project Failed to create app icon: The image format could not be determined error: script "tauri" exited with code 1 MacBookPro:omni-app-research eon$

Answer skipped.


MacBookPro:omni-app-research eon$ file src-tauri/icons/*.png

src-tauri/icons/128x128.png:           PNG image data, 128 x 128, 8-bit/color RGBA, non-interlaced src-tauri/icons/128x128@2x.png:        PNG image data, 256 x 256, 8-bit/color RGBA, non-interlaced src-tauri/icons/32x32.png:             PNG image data, 32 x 32, 8-bit/color RGBA, non-interlaced src-tauri/icons/64x64.png:             PNG image data, 64 x 64, 8-bit/color RGBA, non-interlaced src-tauri/icons/Square107x107Logo.png: PNG image data, 107 x 107, 8-bit/color RGBA, non-interlaced src-tauri/icons/Square142x142Logo.png: PNG image data, 142 x 142, 8-bit/color RGBA, non-interlaced src-tauri/icons/Square150x150Logo.png: PNG image data, 150 x 150, 8-bit/color RGBA, non-interlaced src-tauri/icons/Square284x284Logo.png: PNG image data, 284 x 284, 8-bit/color RGBA, non-interlaced src-tauri/icons/Square30x30Logo.png:   PNG image data, 30 x 30, 8-bit/color RGBA, non-interlaced src-tauri/icons/Square310x310Logo.png: PNG image data, 310 x 310, 8-bit/color RGBA, non-interlaced src-tauri/icons/Square44x44Logo.png:   PNG image data, 44 x 44, 8-bit/color RGBA, non-interlaced src-tauri/icons/Square71x71Logo.png:   PNG image data, 71 x 71, 8-bit/color RGBA, non-interlaced src-tauri/icons/Square89x89Logo.png:   PNG image data, 89 x 89, 8-bit/color RGBA, non-interlaced src-tauri/icons/StoreLogo.png:         PNG image data, 50 x 50, 8-bit/color RGBA, non-interlaced src-tauri/icons/icon.png:              PNG image data, 512 x 512, 8-bit/color RGBA, non-interlaced MacBookPro:omni-app-research eon$ file src-tauri/icons/icon.icns src-tauri/icons/icon.icns: Mac OS X icon, 162553 bytes, "ic13" type MacBookPro:omni-app-research eon$ file src-tauri/icons/icon.ico src-tauri/icons/icon.ico: MS Windows icon resource - 6 icons, 32x32 with PNG image data, 32 x 32, 8-bit/color RGBA, non-interlaced, 32 bits/pixel, 16x16 with PNG image data, 16 x 16, 8-bit/color RGBA, non-interlaced, 32 bits/pixel MacBookPro:omni-app-research eon$

All your icon files are perfectly valid! The issue must be in your tauri.conf.json configuration. Let me help you check and fix it.

Please share your tauri.conf.json file, specifically the bundle.icon section. Run this command:

cat src-tauri/tauri.conf.json | grep -A 10 '"icon"'

Or if you're using Tauri v2, the config might be structured differently. The error suggests the bundler can't find or read the icon configuration properly.3839

Common Issues to Check

The bundle.icon array should look like this for Tauri v2:4038

"bundle": {
  "icon": [
    "icons/32x32.png",
    "icons/128x128.png",
    "icons/128x128@2x.png",
    "icons/icon.icns",
    "icons/icon.ico"
  ]
}

Important: Make sure the icon paths are relative to the tauri.conf.json file location (which is in src-tauri/), so they should be "icons/..." not "src-tauri/icons/...".3941

Also verify you're using the correct config structure for your Tauri version:

cargo tauri --version

If you're on Tauri v2, the config structure is different from v1, and mixing them causes errors like this.423840 4344454647


MacBookPro:omni-app-research eon$ # Install tauri-cli if needed

MacBookPro:omni-app-research eon$ cargo install tauri-cli     Updating crates.io index      Ignored package tauri-cli v2.9.6 is already installed, use --force to override MacBookPro:omni-app-research eon$MacBookPro:omni-app-research eon$ # Generate icons from a source PNG (1024x1024 recommended) MacBookPro:omni-app-research eon$ cargo tauri icon icon_1024.png         Appx Creating StoreLogo.png         Appx Creating Square30x30Logo.png         Appx Creating Square44x44Logo.png         Appx Creating Square71x71Logo.png         Appx Creating Square89x89Logo.png         Appx Creating Square107x107Logo.png         Appx Creating Square142x142Logo.png         Appx Creating Square150x150Logo.png         Appx Creating Square284x284Logo.png         Appx Creating Square310x310Logo.png         ICNS Creating icon.icns          ICO Creating icon.ico          PNG Creating 32x32.png          PNG Creating 64x64.png          PNG Creating 128x128.png          PNG Creating 128x128@2x.png          PNG Creating icon.png          iOS Creating AppIcon-20x20@2x-1.png          iOS Creating AppIcon-20x20@1x.png          iOS Creating AppIcon-20x20@2x.png          iOS Creating AppIcon-20x20@3x.png          iOS Creating AppIcon-29x29@2x-1.png          iOS Creating AppIcon-29x29@1x.png          iOS Creating AppIcon-29x29@2x.png          iOS Creating AppIcon-29x29@3x.png          iOS Creating AppIcon-40x40@2x-1.png          iOS Creating AppIcon-40x40@1x.png          iOS Creating AppIcon-40x40@2x.png          iOS Creating AppIcon-40x40@3x.png          iOS Creating AppIcon-60x60@2x.png          iOS Creating AppIcon-60x60@3x.png          iOS Creating AppIcon-76x76@1x.png          iOS Creating AppIcon-76x76@2x.png          iOS Creating AppIcon-83.5x83.5@2x.png          iOS Creating AppIcon-512@2x.png      Android Creating mipmap-hdpi/ic_launcher_foreground.png      Android Creating mipmap-mdpi/ic_launcher_foreground.png      Android Creating mipmap-xhdpi/ic_launcher_foreground.png      Android Creating mipmap-xxhdpi/ic_launcher_foreground.png      Android Creating mipmap-xxxhdpi/ic_launcher_foreground.png      Android Creating mipmap-hdpi/ic_launcher_round.png      Android Creating mipmap-hdpi/ic_launcher.png      Android Creating mipmap-mdpi/ic_launcher_round.png      Android Creating mipmap-mdpi/ic_launcher.png      Android Creating mipmap-xhdpi/ic_launcher_round.png      Android Creating mipmap-xhdpi/ic_launcher.png      Android Creating mipmap-xxhdpi/ic_launcher_round.png      Android Creating mipmap-xxhdpi/ic_launcher.png      Android Creating mipmap-xxxhdpi/ic_launcher_round.png      Android Creating mipmap-xxxhdpi/ic_launcher.png MacBookPro:omni-app-research eon$MacBookPro:omni-app-research eon$ cargo tauri --version tauri-cli 2.9.6

Good! You're on Tauri v2.9.6 and the icons were successfully generated. Now let's check your configuration file. Please run:

cat src-tauri/tauri.conf.json

Or at least show the bundle section:

cat src-tauri/tauri.conf.json | grep -A 20 '"bundle"'

Based on the Tauri v2 documentation, your bundle.icon configuration should look like this:484950

"bundle": {
  "active": true,
  "targets": "all",
  "identifier": "com.yourcompany.omni-app",
  "icon": [
    "icons/32x32.png",
    "icons/128x128.png",
    "icons/128x128@2x.png",
    "icons/icon.icns",
    "icons/icon.ico"
  ]
}

Critical: The paths must be relative to the tauri.conf.json file location (which is in src-tauri/), so they should be "icons/..." NOT "src-tauri/icons/...".5148

If your config file has a different structure or the icon paths are wrong, that would explain why the bundler says "image format could not be determined" even though all your icon files are valid. Share your config and I can spot the exact issue. 525354555657


Last login: Sun Jan 18 23:27:18 on ttys001

The default interactive shell is now zsh. To update your account to use zsh, please run chsh -s /bin/zsh. For more details, please visit https://support.apple.com/kb/HT208050. MacBookPro:omni-app-research eon$ cat src-tauri/tauri.conf.json | grep -A 20 '"bundle"'   "bundle": {     "active": true,     "targets": "all",     "externalBin": ["binaries/omni"],     "icon": [       "icons/icon.png",       "icons/icon.svg"     ]   },   "plugins": {     "updater": {       "pubkey": "YOUR_PUBLIC_KEY_HERE",       "endpoints": [         "https://github.com/edgeleap/omni/releases/latest/download/latest.json"       ]     }   } } MacBookPro:omni-app-research eon$

Found it! The issue is the icon.svg in your configuration. Tauri's bundler doesn't support SVG files for app icons - it needs the platform-specific formats (PNG, ICNS, ICO).

Fix

Update your tauri.conf.json bundle icon array to include the proper icon files:

"bundle": {
  "active": true,
  "targets": "all",
  "externalBin": ["binaries/omni"],
  "icon": [
    "icons/32x32.png",
    "icons/128x128.png",
    "icons/128x128@2x.png",
    "icons/icon.icns",
    "icons/icon.ico"
  ]
}

You can edit it with:

nano src-tauri/tauri.conf.json

Or use this sed command to replace the icon array:

sed -i '' 's|"icons/icon.png",|"icons/32x32.png",\n      "icons/128x128.png",\n      "icons/128x128@2x.png",\n      "icons/icon.icns",|; s|"icons/icon.svg"|"icons/icon.ico"|' src-tauri/tauri.conf.json

After making the change, run your build again:

bun run tauri build

The icon.svg file you have (189 bytes) was causing the "image format could not be determined" error because the bundler tried to process it as a raster image but couldn't parse it.

Footnotes

  1. https://v2.tauri.app/develop/icons/

  2. https://tauri.app/v1/guides/features/icons/ 2

  3. https://tauri.app/v1/guides/features/icons

  4. https://crates.io/crates/tauri-bundler/2.2.3

  5. https://v2.tauri.app/release/tauri-bundler/v1.2.0/

  6. https://stackoverflow.com/questions/78477494/i-am-facing-a-problem-while-updating-the-tauri-app-exe-icon

  7. https://github.com/tauri-apps/tauri/issues/13732

  8. https://github.com/tauri-apps/tauri/issues/3941

  9. https://v2.tauri.app/reference/config/

  10. https://github.com/tauri-apps/tauri/issues/4669

  11. https://github.com/tauri-apps/tauri/issues/5781

  12. https://github.com/tauri-apps/tauri/discussions/10999

  13. https://github.com/tauri-apps/tauri/issues/6595

  14. https://favicon.im/blog/favicon-electron-tauri-desktop-app-branding

  15. https://stackoverflow.com/questions/75315161/changing-icons-in-the-tauri-application

  16. https://stackoverflow.com/questions/72476337/how-to-create-icons-with-tauricon

  17. https://stackoverflow.com/questions/78627591/tauri-conf-json-changed-icons-productname-and-title-and-now-get-errors-when-tr

  18. https://tauri.app/v1/api/cli 2

  19. https://stackoverflow.com/questions/78324346/is-there-a-correct-way-to-set-the-icons-for-my-tauri-application 2

  20. https://tauri.app/v1/guides/features/icons/

  21. https://stackoverflow.com/questions/75013520/when-i-install-and-run-tauri-on-mac-os-monterey-i-get-immediate-error

  22. https://github.com/tauri-apps/tauri-docs/issues/796

  23. https://crates.io/crates/tauri-cli

  24. https://github.com/tauri-apps/tauri/issues/12981

  25. https://github.com/tauri-apps/tauri-docs/issues/2943

  26. https://crates.io/crates/tauri-bundler/2.2.3

  27. https://tauri.app/v1/guides/faq

  28. https://v2.tauri.app/reference/config/

  29. https://github.com/tauri-apps/tauri/issues/8418

  30. https://www.youtube.com/watch?v=szibOq-XMKk

  31. https://v2.tauri.app/develop/configuration-files/

  32. https://stackoverflow.com/questions/78627591/tauri-conf-json-changed-icons-productname-and-title-and-now-get-errors-when-tr

  33. https://github.com/tauri-apps/tauri-action/issues/957

  34. https://v2.tauri.app/plugin/updater/

  35. https://github.com/tauri-apps/tauri/discussions/4295

  36. https://stackoverflow.com/questions/78477494/i-am-facing-a-problem-while-updating-the-tauri-app-exe-icon

  37. https://tauri.app/v1/api/config/

  38. https://stackoverflow.com/questions/78627591/tauri-conf-json-changed-icons-productname-and-title-and-now-get-errors-when-tr 2 3

  39. https://v2.tauri.app/reference/config/ 2

  40. https://github.com/tauri-apps/tauri/issues/13732 2

  41. https://v2.tauri.app/distribute/macos-application-bundle/

  42. https://github.com/tauri-apps/tauri/issues/13649

  43. https://docs.rs/tauri/latest/tauri/struct.Config.html

  44. https://github.com/tauri-apps/tauri/discussions/11567

  45. https://betterprogramming.pub/create-menubar-app-with-tauri-510ab7f7c43d

  46. https://tauri.app/v1/api/config

  47. https://v2.tauri.app/develop/resources/

  48. https://v2.tauri.app/develop/icons/ 2

  49. https://stackoverflow.com/questions/78627591/tauri-conf-json-changed-icons-productname-and-title-and-now-get-errors-when-tr

  50. https://v2.tauri.app/reference/config/

  51. https://v2.tauri.app/start/project-structure/

  52. https://docs.rs/tauri/latest/tauri/struct.Config.html

  53. https://github.com/tauri-apps/tauri/issues/6746

  54. https://schema.tauri.app/config/2

  55. https://github.com/tauri-apps/tauri/issues/13770

  56. https://github.com/orgs/tauri-apps/discussions/9363

  57. https://github.com/tauri-apps/tauri/issues/14176

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment