Skip to content

AshutoshM10/image-optimizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ–ΌοΈ Image Optimization Service

A lightweight, fast, and production-ready on-the-fly image optimization backend using FastAPI.
It resizes and converts images to modern formats (like WebP), ideal for integration with CDNs like CloudFront.


πŸš€ Features

  • πŸ”§ Resize images dynamically via query params
  • 🌐 Convert to webp, jpeg, or png
  • πŸ“¦ Built with FastAPI and Pillow
  • πŸ” CORS enabled for browser and CDN use
  • ⚑ Ready to be deployed behind CloudFront

πŸ“ Project Structure

image-optimizer/
β”œβ”€β”€ src/
β”‚ β”œβ”€β”€ main.py # FastAPI app
β”‚ β”œβ”€β”€ image_utils.py # Image processing logic
β”‚ β”œβ”€β”€ requirements.txt
β”‚ └── Dockerfile (optional)

Install Python Dependencies

pip install -r requirements.txt

Run the Application

uvicorn main:app --reload --host 0.0.0.0 --port 8000

Your API will be running at: http://localhost:8000/docs

Dependencies

  • FastAPI
  • Uvicorn
  • Pillow (PIL)
  • requests

πŸ‘€ Code Owner & Creator

Repository Owner: Ashutosh Mohanty
Contact: https://www.linkedin.com/in/ashutoshmohanty-devops/


πŸ“„ License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors