Stars
Forks
Watchers
Developer links
imgpush
Your app needs avatars, attachments and user photos, and imgpush is the tiny service that takes them off your hands. Send one upload request with a file or a URL and you get back a filename; ask for that file with a width and height in the address and you receive exactly that crop, converted to the format you configured. Originals live on local disk or in any S3-compatible bucket (AWS S3, Cloudflare R2, MinIO or Backblaze B2), with resized variants cached locally for fast serving. Abuse controls come built in: per-IP upload quotas per minute, hour and day, an allowed-origins whitelist, and an optional nudity filter that can also sample video frames before an upload is accepted. An API key can be required for uploads, deletes remove the original together with every cached size, and a liveness endpoint keeps Docker and Kubernetes health checks honest. One Docker container on port 5000, a page of environment variables, and your application never writes image code again. Running on a dedicated VPS on RepoCloud with guaranteed CPU, RAM, and SSD, full root SSH access, and a browser serial console. MIT licensed.
Benefits
- One Endpoint, Zero Image Code
- A single upload call returns a filename and every later view is a URL with dimensions, so your application ships avatars, thumbnails and attachments without an imaging library, queues or storage code.
- Storage That Follows You
- Keep originals on a local volume for a small app, or flip one variable to S3, Cloudflare R2, MinIO or Backblaze B2, with a bounded local cache keeping hot resized variants fast to serve.
- Abuse Controls Built In
- Upload quotas per IP per minute, hour and day, origin whitelisting and an optional nudity filter for images and videos stop your free image endpoint from becoming someone else's free image host.
- Honest Production Manners
- API key gates for uploads and deletes, failed-key throttling, a liveness probe for Docker and Kubernetes, and a migration script for moving an existing library into S3 keep operations boring.
Features
- Upload By File Or URL
- POST a multipart file or a JSON body with an image URL and receive a short filename, with random or UUID naming strategies and a configurable maximum file size.
- On-Demand Resizing
- Request any stored image with width and height parameters to get that exact crop, cached after the first hit, optionally restricted to an allowlist of sizes you choose.
- Automatic Format Conversion
- Every upload can be converted to a fixed output type (PNG, JPG) through ImageMagick, normalizing whatever users send into what your interface expects.
- Authenticated Delete API
- A DELETE call with a bearer API key removes the original and all cached resized versions at once, and failed key attempts are throttled per IP address.
- S3-Compatible Backend
- Originals go to your bucket under a configurable prefix, resized variants cache in S3 and on local disk with LRU eviction, and a script migrates existing local libraries.