Skip to content

g-marcin/image-resizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Resizer CDN

FastAPI service for serving and resizing images with on-the-fly resizing via URL parameters.

Quick Start

  1. Install dependencies:
pip install -r requirements.txt
  1. Configure .env:
ASSETS_DIR=/path/to/images
CACHE_DIR=./cache
PORT=8001
  1. Run:
uvicorn app.main:app --host 0.0.0.0 --port 8001

Usage

Original image:

GET /images/path/to/image.jpg

Resized image:

GET /images/path/to/image-1200-800.jpg

Health check:

GET /health

Features

  • On-the-fly image resizing
  • Disk caching with size limits
  • Aspect ratio preservation
  • JPEG optimization
  • CORS support

About

CDN service for optimized image delivery. Supports the WooF App infrastructure with resized assets served via cdn.mgrzmil.dev.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors