selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

ImageFlow logo

Self-host ImageFlow

v3.0

Image hosting with automatic WebP/AVIF optimization

ReleaseOpen SourceMIT
Docker ComposeCompose file & guide
docker-compose up -d
Updated7 months ago
LanguageTypescript
Setup difficultyModerate
MobileResponsive
ThemeDark mode
Stars
606
RAM
Minimum 1GB RAM recommended
Storage
Sufficient disk space for image storage
Ports
3000 (Next.js frontend web interface), 8686 (Go backend API server)
Docker
soyorins/imageflow-backend
ImageFlow screenshot 1ImageFlow screenshot 2ImageFlow screenshot 3ImageFlow screenshot 4ImageFlow screenshot 5

What is ImageFlow?

ImageFlow is a full-stack image hosting and delivery platform for people running their own image service for websites and applications. Uploaded pictures are converted to WebP and AVIF by a libvips-powered Go backend, and each visit is served the best format the browser supports (AVIF first, then WebP, then the original). It can also pick a portrait or landscape variant depending on the device, which makes it handy as a random-wallpaper endpoint. A Next.js 14 web UI covers drag-and-drop batch uploads, tagging, browsing and deletion, while a public REST API endpoint (GET /api/random) serves images filtered by tags, orientation and format. Files live on the local filesystem or in any S3-compatible bucket, Redis stores metadata and tag indexes, and images can be given an expiry time after which they are deleted automatically. Management endpoints are guarded by an API key. Self-hosting is a three-container Docker Compose stack; the project is MIT-licensed with stable releases up to v3.0.

Should you self-host ImageFlow?

ImageFlow scores 49/100 on selfhost.directory (how scoring works) and ranks #3 of 9 in Image Management. It has 606 GitHub stars.

It shipped 1 stable release in the past year. The latest, v3.0, came out on 12 December 2025.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is MIT-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is Slink (59/100, 1 614 stars). It scores higher overall, so compare the two before you pick. See ImageFlow vs Slink side by side.

Features

  • Animated GIF preservation
  • API Key Authentication
  • Async background processing
  • Automatic WebP/AVIF conversion
  • Browser format negotiation
  • Configurable CORS
  • Device-aware image serving
  • Drag-and-drop batch upload
  • Expiring images with auto cleanup
  • Image management UI
  • Local or S3-compatible storage
  • Multi-tag filtering
  • Random image API
  • REST API
  • Sensitive content exclusion

ImageFlow README

How to install ImageFlow

Install ImageFlow with Docker Compose

Docker and Docker Compose installed
Environment variables
API_KEY, STORAGE_TYPE, METADATA_STORE_TYPE, REDIS_HOST, REDIS_PORT, REDIS_PASSWORD, REDIS_DB, REDIS_TLS_ENABLED, S3_ENDPOINT, S3_REGION, S3_ACCESS_KEY, S3_SECRET_KEY, S3_BUCKET, CUSTOM_DOMAIN, MAX_UPLOAD_COUNT, IMAGE_QUALITY, WORKER_THREADS, WORKER_POOL_SIZE, SPEED, NEXT_PUBLIC_API_URL, NEXT_PUBLIC_REMOTE_PATTERNS, DEBUG_MODE
# Clone the repository
git clone https://github.com/Yuri-NagaSaki/ImageFlow.git
cd ImageFlow

# Create configuration file
cp .env.example .env

# Edit configuration (see Configuration section below)
nano .env

# Start all services (using pre-built images)
docker-compose up -d

Frontend on port 3000, backend API on port 8686; stack includes a Redis container.

How to configure ImageFlow

  • API_KEYAuthentication key for upload/management APIs

    Authentication key for upload/management APIs

  • CUSTOM_DOMAINCustom domain for S3 assets

    Custom domain for S3 assets

  • DEBUG_MODEfalseEnable debug logging

    Enable debug logging

  • IMAGE_QUALITY80Conversion quality (1-100)

    Conversion quality (1-100)

  • LOCAL_STORAGE_PATHstatic/imagesPath for local image storage

    Path for local image storage

  • MAX_UPLOAD_COUNT20Maximum images per upload request

    Maximum images per upload request

  • METADATA_STORE_TYPEredisMetadata storage type

    Metadata storage type

  • NEXT_PUBLIC_API_URLBackend API URL for frontend

    Backend API URL for frontend

  • NEXT_PUBLIC_REMOTE_PATTERNSAllowed image domains (comma-separated)

    Allowed image domains (comma-separated)

  • REDIS_DB0Redis database number

    Redis database number

  • REDIS_HOSTlocalhostRedis server hostname

    Redis server hostname

  • REDIS_PASSWORDRedis authentication password

    Redis authentication password

  • REDIS_PORT6379Redis server port

    Redis server port

  • REDIS_TLS_ENABLEDfalseEnable TLS for Redis connection

    Enable TLS for Redis connection

  • S3_ACCESS_KEYS3 access key

    S3 access key

  • S3_BUCKETS3 bucket name

    S3 bucket name

  • S3_ENDPOINTS3 endpoint URL

    S3 endpoint URL

  • S3_REGIONS3 region

    S3 region

  • S3_SECRET_KEYS3 secret key

    S3 secret key

  • S3_USE_SSLtrueWhether the S3 connection uses SSL/TLS (docs configuration page).

    Whether the S3 connection uses SSL/TLS (docs configuration page).

    values: true/false

  • SPEED5Encoding speed (0=slowest/best, 8=fastest)

    Encoding speed (0=slowest/best, 8=fastest)

  • STORAGE_TYPElocalStorage backend: `local` or `s3`

    Storage backend: `local` or `s3`

  • WORKER_POOL_SIZE4Concurrent image processing workers

    Concurrent image processing workers

  • WORKER_THREADS4libvips parallel processing threads

    libvips parallel processing threads

ImageFlow releases & version history

More in Image Management

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…