Skip to content

sasky80/2ico

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2ico: Image → ICO/Other Converter

A lightweight web service to convert images (incl. HEIC) to ICO, PNG, JPG, WebP, and AVIF. Backend uses Node.js + Express with sharp for image processing and to-ico for multi-size ICOs. Designed for Linux deployment with Docker.

Landing page

Quick Start (Full Stack with Docker)

No Node.js installation required!

docker compose build
docker compose up -d

Then open http://localhost:8080 in your browser.

The app includes:

  • Frontend React SPA with drag-and-drop UI
  • Backend conversion API with HEIC support
  • Nginx reverse proxy

Quick Start (Backend Only)

Local (Windows/macOS/Linux)

  1. Install Node.js 18+.
  2. Install dependencies:
cd server
npm install
  1. Run the server:
npm start
  1. Test health: GET http://localhost:3000/health

Docker (Linux)

docker compose build
docker compose up -d

Then open http://localhost:3000/health.

API

  • POST /convert (multipart/form-data)

    • fields:
      • file: source image
      • outputFormat: one of ico|png|jpg|jpeg|webp|avif
      • sizes (optional for ico): comma-separated sizes, default 16,32,48,64,128,256
    • response: binary stream with Content-Type and Content-Disposition: attachment; filename=...
  • GET /health: returns status and versions.

Notes

  • HEIC/HEIF decoding requires libvips with libheif support. The Dockerfile uses node:bookworm-slim and installs libvips + libheif.
  • Large images are limited by MAX_UPLOAD_BYTES (default 30MB).
  • Animated inputs are not explicitly handled; first frame may be used.

Frontend (Local Development)

The client is a React + Vite SPA with Tailwind CSS and DaisyUI.

Prerequisites: Install Node.js 18+ first.

Development

cd client
npm install
npm run dev

Open http://localhost:5173. The dev server proxies /api/* to http://localhost:3000.

Production Build

cd client
npm run build

The dist/ folder contains the static assets ready for deployment.

Full Stack (Local Development)

Prerequisites: Install Node.js 18+ first.

  1. Start backend: cd server && npm install && npm start
  2. Start frontend: cd client && npm install && npm run dev
  3. Open http://localhost:5173

About

A lightweight web service to convert images (incl. HEIC) to ICO, PNG, JPG, WebP, and AVIF. Backend uses Node.js + Express with `sharp` for image processing and `to-ico` for multi-size ICOs. Designed for Linux deployment with Docker.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors