Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Shrink

demo of shrink

A simple self-hosted tool for compressing and resizing images. Upload an image, set your desired quality and optional width, and download the compressed JPEG.

  • Single Go binary
  • Compress images to JPEG with configurable quality (1-100)
  • Optional resize by width (preserves aspect ratio)
  • 20MB upload limit

Configure

Environment Variables

VariableDescriptionDefault
HOSTServer bind host127.0.0.1
PORTServer bind port3000

Deploy

Railway

The easiest way to deploy Shrink is with the one-click Railway template. See the Deploying with Railway guide for a walkthrough of the process. Shrink needs no environment variables beyond the defaults.

Deploy on Railway

Docker

cd apps/shrink
docker compose up -d

This will start Shrink on port 3000.

Binary

Install with Homebrew:

brew install stevedylandev/tap/shrink

Or grab a prebuilt binary from the releases page.

You can also build from source:

cd apps/shrink && go build .

The resulting binary is self-contained. Copy it to your server and run it directly.

Use

Upload an image, set your desired quality (1-100) and an optional target width, then download the compressed JPEG. Aspect ratio is preserved when resizing.

JPEG EXIF metadata is preserved after recompression, with GPS data stripped. Upload limit is 20 MB.