afterburn / rust-image-proxy

Simple image proxy built with Actix Web

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Simple image proxy built with Actix Web


Languages

Language:Rust 99.9%Language:Shell 0.1%