Skip to content

🏞️ Image Proxy. Convert HEIC to PNG with Pillow and FastAPI

License

Notifications You must be signed in to change notification settings

fuongz/image-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Proxy - HEIC to PNG converter

codecov Unit Test GitHub Release

Table of Contents

Tech stack:

  • FastAPI
  • Pillow

Features

  • Convert image to any file extensions
  • Resize image
  • Support Bypass CORS
  • Support .GIF file

Environment variables

SUPPORTED_SCHEMES = ["http", "https"]
MAX_FILE_SIZE = 12400000
TIMEOUT = 15
SUPPORTED_FILE_TYPES = [
    "image/png",
    "image/jpeg",
    "image/heif",
    "image/heic",
    "image/webp",
]
SUPPORTED_OUTPUT_IMAGE_TYPES = ["JPG", "JPEG", "PNG", "WEBP"]

Development

  1. Clone this repository
git clone git@github.com:fuongz/image-proxy.git
  1. Install the required dependencies
# with venv
# python -m venv venv

pip install -r requirements.txt
  1. Run with fastapi and expose to port 3000
fastapi dev app/main.py --port 3000

License