mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
- Create 53 per-tool VitePress documentation pages with accurate parameters from Zod schemas, example requests, and response formats - Add root llms.txt for LLM-friendly repo browsing - Fix OpenAPI spec: add auth and 422 error schemas to edit-metadata/inspect and strip-metadata/inspect sub-routes - Fix tool count inconsistency (52 -> 53) across landing site, e2e tests, and local docs - Rename color-adjustments.ts to adjust-colors.ts to match tool ID - Update VitePress sidebar with all 8 tool categories and top nav
2.9 KiB
2.9 KiB
description
| description |
|---|
| Generate all standard favicon and app icon sizes from a source image. |
Favicon Generator
Generate a complete set of favicon and app icon files from a source image. Produces all standard sizes needed for browsers, Apple devices, and Android, along with a web manifest and an HTML snippet.
API Endpoint
POST /api/v1/tools/favicon
Accepts multipart form data with one or more image files. No settings are required.
Parameters
This tool has no configurable parameters. It generates all standard sizes automatically.
Generated Files
For each input image, the following files are produced:
| File | Size | Purpose |
|---|---|---|
favicon-16x16.png |
16x16 | Browser tab icon |
favicon-32x32.png |
32x32 | Browser tab icon (HiDPI) |
favicon-48x48.png |
48x48 | Desktop shortcut |
apple-touch-icon.png |
180x180 | iOS home screen |
android-chrome-192x192.png |
192x192 | Android home screen |
android-chrome-512x512.png |
512x512 | Android splash screen |
favicon.ico |
32x32 | Legacy ICO format |
manifest.json |
- | Web app manifest with icon references |
favicon-snippet.html |
- | Ready-to-use HTML link tags |
Example Request
Single source image:
curl -X POST http://localhost:1349/api/v1/tools/favicon \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@logo.png"
Multiple source images (each gets its own set in a subfolder):
curl -X POST http://localhost:1349/api/v1/tools/favicon \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@logo-light.png" \
-F "file=@logo-dark.png"
Example Response
The response is a ZIP file streamed directly. The response headers are:
Content-Type: application/zip
Content-Disposition: attachment; filename="favicons-a1b2c3d4.zip"
HTML Snippet Included
The ZIP includes a favicon-snippet.html file you can paste into your HTML <head>:
<!-- Favicons -->
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="48x48" href="/favicon-48x48.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="manifest" href="/manifest.json">
Notes
- Source images are resized using
coverfit mode, meaning they are cropped to fill each square size. For best results, use a square source image. - When multiple files are uploaded, each gets its own subfolder in the ZIP (named after the source file).
- For a single file upload, all outputs are at the root of the ZIP with no subfolder.
- Files that fail validation or decoding are skipped, and a
skipped-files.txtis included in the ZIP explaining the issues. - Supported input formats: JPEG, PNG, WebP, AVIF, TIFF, GIF, HEIC, SVG, RAW, PSD, and more.
- EXIF orientation is auto-applied before resizing.