A small Flutter desktop app for loading an image, previewing it, resizing it, and exporting it to another format.
- Loads and previews image files.
- Default resize preset is
1200x scale. - Custom resize mode accepts width, height, or both.
- Default export format is
WEBP. - Exports automatically to the configured export directory, currently defaulting to the user's Downloads folder.
- Output filenames are lower-case, underscore-separated, and capped by the configured max base filename length.
- Bundles
cwebpbinaries for WEBP export on Linux, macOS, and Windows desktop builds. - Registers image file handling metadata for Linux and macOS so the app can appear in
Open With.... - Supports
Ctrl+O/Cmd+Oto open an image andCtrl+S/Cmd+Sto export. - Persists app settings for defaults such as export directory, format, resize, filename length, and export quality.
- Includes a simple About dialog with version, author, license, and repository URL.
Defaults are centralized in AppSettings in lib/main.dart:
defaultFormat:WEBPdefaultResizePreset:1200x scaledefaultExportDirectory: system Downloads folder when unsetmaxBaseFilenameLength:32webpQuality:80jpegQuality:80
These defaults can be changed from the Settings dialog.
The default export behavior is equivalent to:
convert -quality 80 -resize 1200x input.jpg input.webpflutter run -d macos
flutter run -d linux
flutter run -d windowsflutter build macos
flutter build linux
flutter build windowsGitHub Actions builds release artifacts for every pushed tag:
git tag v1.0.0
git push origin v1.0.0The workflow publishes:
- notarized macOS
.dmg - Linux
.AppImage - Windows setup
.exe
macOS signing and notarization use these repository secrets:
MACOS_CERTIFICATE: base64-encoded Developer ID Application.p12MACOS_CERTIFICATE_PASSWORD: password for that.p12AC_APPLE_ID: Apple ID used for notarizationAC_TEAM_ID: Apple Developer Team IDAC_PASSWORD: app-specific password for the Apple ID
Launcher icons are generated from assets/icons/icon-1024.png.
macOS and Windows assets are generated with:
dart run flutter_launcher_iconsLinux hicolor PNG assets live under linux/icons/hicolor and are installed by the Linux CMake bundle step.
macOS may cache app icons by bundle path. If a rebuilt app shows an old icon in Finder or Dock, the bundle can still contain the correct AppIcon.icns; moving the .app to a fresh path or clearing the old Dock entry refreshes the displayed icon.
The project includes linux/com.example.flutter_image_resizer.desktop with image MIME types and %f file launching.
Development Linux installs use the desktop entry in a user applications directory, followed by a desktop database refresh:
desktop-file-install --dir="$HOME/.local/share/applications" linux/com.example.flutter_image_resizer.desktop
update-desktop-database "$HOME/.local/share/applications"The Exec path in the installed desktop file points to the built flutter_image_resizer executable. Nautilus can then show the app in Open With..., and the app can be selected as the default image handler from file properties.
The macOS bundle declares image document types in macos/Runner/Info.plist. Finder uses this metadata to show the built .app in Open With....
The macOS app is intentionally not sandboxed. WEBP export launches the bundled cwebp encoder process, and the app sandbox blocks that subprocess with Operation not permitted. file_picker entitlement checks are skipped at startup on macOS for this non-sandboxed distribution model.
Finder default-app registration uses the standard Open with section in Get Info. Once the built .app is installed in /Applications or ~/Applications, Finder can assign Image Resizer as the handler for a selected image type with Change All....
Finder open events are bridged from AppDelegate.swift to Flutter through the image_resizer/open_file method channel.