Rafsan
doctor-image · open source

Image Converter

A privacy-first image processing platform. One codebase, two ways to use it — an instant Web App and a 100% offline npm CLI. Convert, compress, resize, crop, clean metadata, watermark & batch — while your photos never leave your machine.

10+

Formats

500

Batch files

2GB

Max upload

100%

Private

Overview

What is doctor-image?

doctor-image (npm:nanopi-doctor-image) is an open-source, privacy-first image processing platform. It converts, compresses, resizes, crops, rotates, strips metadata and watermarks images — entirely in memory. Nothing is stored permanently, and no third-party API ever sees your photos.

Convert

10+ formats — PNG, JPG, WEBP, AVIF, TIFF, GIF, HEIC, SVG, BMP, ICO

Compress

Quality presets + fine-tune slider with live size prediction

Resize

Width / Height / Percentage modes with smart fit options

Crop

Manual, center, square & social media presets

Rotate & Flip

90°/180°/270° plus horizontal & vertical flip

Metadata

Inspect EXIF, GPS & camera data — then clean it

Watermark

Text or logo with opacity, position & padding

Batch

Up to 500 files at once: convert + compress + resize

Sequence

Frame sequences → WebP/AVIF/JPEG in natural order

Note:despite the “doctor” name, there is no AI or machine-learning here — it's a battle-tested image processing engine powered by Sharp (libvips). Real AI features (background removal, upscaling) are on the roadmap.

Channel 1 · Web App

A public website hosted on Vercel. Open it in the browser and process images instantly — no install, no signup.

Channel 2 · npm CLI

Install once globally, then run nanopi-image locally. 100% self-hosted — perfect for offline or private work.

How it works

The architecture flow

  1. 1

    Upload

    Browser sends files as multipart/form-data — drag & drop, browse or clipboard paste.

  2. 2

    Validate & secure

    parseUpload() runs magic-byte checks, validation, per-IP rate limiting and timeouts.

  3. 3

    Process in memory

    Sharp pipeline converts, compresses, resizes, crops, rotates or watermarks. Buffers only — never touched to disk permanently.

  4. 4

    Respond

    Binary response with X-Image-* headers, or a ZIP for batch jobs.

  5. 5

    Preview & download

    Browser builds the file with createObjectURL — before/after slider, savings % and one-click download.

Buffer-first

No disk usage

Binary

Light responses

Stateless

Horizontal scaling

Quick start

Try it in 2 minutes

Via Website

Fastest path — no sign up, no login, no install.

  1. 1.Open the live app
  2. 2.Drop a photo
  3. 3.Pick a tool & process
Open live app

Via npm CLI

Self-hosted & offline — best for privacy.

Terminal
npm install -g nanopi-doctor-image
nanopi-image

That's it — the browser opens at http://localhost:3000.

The first run builds the app locally (a few minutes) so the native Sharp binary matches your OS. After that it starts instantly.

Web App

The browser experience

The web version is a one-page dashboard with live before/after previews, stat cards and glassmorphism UI. Nobody needs a sign up or login — just open it, drop a file and process it.

  • No sign up or login required
  • Instant in-browser processing
  • Drag & drop, browse or paste upload
  • Search any tool from the dashboard

Live — already deployed on Vercel

The web app is hosted and live right now. No setup, no signup — just open it and go.

https://doctor-image-delta.vercel.app
Open the live app

npm CLI

Self-hosted setup

The CLI is the recommended way to use doctor-image — 100% self-hosted, runs offline, and your photos never leave your machine.

Install the CLI

Terminal
npm install -g nanopi-doctor-image
nanopi-image

That's it — the browser opens at http://localhost:3000.

Update the CLI

Get the latest tools and fixes anytime.

Terminal
npm update -g nanopi-doctor-image

New features are published to npm, and the website auto-updates on git push — always stay current.

Launch options

FlagDescription
-p, --port 8080Run on a specific port
-h, --host 0.0.0.0Share on a local network
--no-openStart server without opening browser

Tools & features

All 9 tools & what they do

Convert

Change an image to any of 10 output formats.

  • PNG, JPG, WEBP, AVIF, TIFF, GIF, HEIC, SVG, BMP, ICO
  • Quality slider (10–100%)
  • Convert All + ZIP download for multiple images
  • Checks format max-dimension limits (WebP 16383px, AVIF 32768px)
  • HEIC → HEVC→AV1 fallback, JPEG uses mozjpeg encoder

Compress

Shrink file size without losing quality.

  • Quality presets: 100/90/80/70/60/50/30/10
  • Fine-tune slider in 1% steps
  • Live prediction — original size, estimated size & saved %
  • Savings % shown on the result panel

Resize

Change image dimensions by exact px or percentage.

  • Width / Height / Percentage — 3 modes
  • Fit: Contain (inside), Cover (fill + edge crop), Stretch
  • Maintain aspect ratio toggle
  • Lanczos3 kernel keeps detail sharp
  • Range: 16–10,000px, or 1–500%

Crop

Crop to exact sizes — in one click.

  • Manual width/height with optional left/top offset
  • Auto-center crop & square crop
  • Social presets: 1200×630 (OG), 1080×1080, 1080×1920, 1500×1500
  • Crop-size validation with friendly errors

Rotate & Flip

Rotate and flip in any combination.

  • Rotate 90°, 180°, 270°
  • Flip horizontal (flop) + flip vertical (flip)
  • All transforms can be combined at once

Metadata

Inspect & remove hidden EXIF/GPS data.

  • View format, dimensions, size, color space, channels, animated
  • Up to 100 EXIF tags + camera info (Make, ISO, lens…)
  • GPS red-alert with coordinates when location data exists
  • Remove all / remove GPS only / remove camera only
  • JPEG surgical removal (piexifjs), others re-encode & strip
  • Clean All + ZIP for bulk privacy

Watermark

Protect images with text or logo watermarks.

  • Text: font size 12–300, any color (color picker)
  • Logo/Image watermark with scale 5–100%
  • Opacity 0.05–1.0
  • 9 positions (top-left … bottom-right)
  • Padding 0–100px
  • SVG text overlay + sharp composite

Batch

Process hundreds of images in one go.

  • Up to 500 files at once
  • Convert + Compress + Resize combos together
  • Smart chunking under Vercel payload limits
  • One ZIP with per-file outcome tracking
  • Failed files auto-skipped, others continue

Sequence

Frame sequences → optimized video formats.

  • Upload frames (frame_0001.png …)
  • Natural sort: frame_0002 before frame_0010
  • Export to WebP / AVIF / JPEG
  • Sequential rename + start index control
  • Export as ZIP

Features shared by every tool

  • Drag & drop, click-to-browse or clipboard paste (⌘V)
  • Before/After compare slider
  • Stat cards: original / processed / change % / est. download
  • Per-file download or Download All (ZIP)
  • Dark UI + glassmorphism + smooth animations
  • Live upload progress & processor status

Security & privacy

Built to protect your photos

Security

  • Magic-byte sniffing — not just extensions
  • Extension ↔ MIME ↔ magic cross-check
  • Per-IP sliding-window rate limiting
  • Upload size & file count limits
  • 128-bit crypto-random temp filenames
  • Path-traversal guards
  • Auto temp cleanup every 10 min
  • Strict security headers, powered-by off
  • Non-root, read-only Docker container

Privacy

  • Photos never leave your server or machine
  • No permanent storage — in-memory buffers
  • No telemetry, no analytics
  • No third-party processing APIs
  • Metadata tool shows & strips GPS/camera data

Lifecycle

Everything runs in-memory. Temp files receive a random ID and auto-clean after 10 minutes — no manual cleanup needed.

Tech stack

What it's built with

Next.js 16

App Router + Turbopack

React 19

TypeScript

Tailwind CSS 4

Framer Motion + lucide icons

Sharp (libvips)

Image processing engine

exifr + piexifjs

EXIF parse & surgical removal

jszip

Server & client ZIP creation

Node.js CLI

bin/nanopi-image.js launcher

Docker / Vercel

Multi-stage & edge deploys

Support & about

Roadmap, license & the creator

Coming next (Roadmap)

  • AI background removal & upscaling
  • Image → PDF / PDF → images
  • Video ↔ frame conversion
  • Favicon & social-media generators
  • QR-code generation
  • SVG & GF optimizer

License

MIT — fully open source. Free to use, fork and ship. Full architecture diagrams live in docs/architecture.md.

Built by

Rafsan

Crafting production-grade web apps, blazing-fast APIs and privacy-first tools. This is one of those tools — built on a single codebase, shipped as both a website and a CLI.