Skip to content

afterburn/rust-image-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rust-image-proxy

A simple image proxy built with Actix Web.

Features

  • Convert images to .webp format.
  • Resize images.

How it works

On first hit images are downloaded via reqwest and stored on disk. Subsequent hits will be served directly from disk.
Image conversion is achieved through libwebp via the Rust implementation webp.
Resizing works via the image crate.

Configuration

// .env
PORT=<your-desired-port>

Example usage

GET /?url=https%3A%2F%2Fplacekitten.com%2F800%2F600&w=300
Param Description
url encoded url of the target image
w desired width for the result
h desired height for the result

Omitting either w or h will preserve original aspect ratio of the image.

Result:

image

Releases

No releases published

Packages

No packages published