Skip to content

feat: add icon generator with preset-based resizing, ZIP export, and optional PWA manifest#1740

Open
fclef819 wants to merge 6 commits intoCorentinTh:mainfrom
fclef819:feature/icon-generator
Open

feat: add icon generator with preset-based resizing, ZIP export, and optional PWA manifest#1740
fclef819 wants to merge 6 commits intoCorentinTh:mainfrom
fclef819:feature/icon-generator

Conversation

@fclef819
Copy link

Summary

  • Add a new Icon generator tool to create multiple app icon sizes from one uploaded image.
  • Support preset-based size selection for PWA, Android, and iOS via buttons.
  • Allow custom output size selection and manual size addition.
  • Add per-file download and bulk ZIP export.
  • Add optional manifest.json inclusion in ZIP (enabled only when PWA preset is active).
  • Add configurable base filename for generated icons with sanitization.

UX / Behavior

  • Default state starts with no preset/size selected.
  • Clicking a preset button checks corresponding size checkboxes.
  • Clear preset sizes unchecks preset sizes and resets manifest option.
  • Include manifest.json in ZIP is disabled unless PWA preset is selected.
  • ZIP filename uses sanitized base name: -icons.zip.
  • Icon filenames follow: -x.png.

Technical Changes

  • New tool files under src/tools/icon-generator/
    • icon-generator.vue
    • icon-generator.service.ts
    • icon-generator.service.test.ts
    • icon-generator.e2e.spec.ts
    • index.ts
  • Register tool in src/tools/index.ts
  • Add/extend i18n strings in:
    • locales/en.yml
  • Add dependency:
    • jszip

Tests

  • Unit tests added/updated for:
    • size normalization
    • preset resolution
    • draw area behavior (cover / contain)
    • base name sanitization and filename generation
    • manifest generation
  • E2E spec expanded to cover:
    • default UI state
    • preset-to-checkbox behavior
    • manifest checkbox enable/disable/reset behavior
    • icon generation and ZIP download flow

@sonarqubecloud
Copy link

@fclef819
Copy link
Author

Thanks for the suggestion. I reviewed the preset sizes and kept them aligned with common platform expectations: the PWA preset includes the key 192x192 and 512x512 icons used for installability, the iOS preset covers the commonly used home-screen/App Store sizes, and the Android preset is intended as a legacy bitmap launcher-icon set. Full Android adaptive icon generation (foreground/background layers and XML resources) is currently out of scope for this tool. For image processing, I intentionally kept the implementation browser-side using canvas, since this tool is designed to run fully client-side. Because of that, introducing sharp, which is primarily suited to Node/server-side image processing, would not be a good fit here. We do already use JSZip for the ZIP export path.

@sharevb
Copy link
Contributor

sharevb commented Mar 1, 2026

Hi @fclef819 , I have also one in my fork : https://sharevb-it-tools.vercel.app/favicon-generator as this repo is unmaintained

And if you are interested in an up to date version of it-tools, with many improvements, new tools, and bug fixes, as this repo is almost no more maintained, I made a fork here : https://github.com/sharevb/it-tools (https://sharevb-it-tools.vercel.app/ and docker images https://github.com/sharevb/it-tools/pkgs/container/it-tools)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants