Skip to content

💰 save bandwidth on imgix, cloudinary, etc. with cloudflare workers

License

Notifications You must be signed in to change notification settings

wilsonhou/cloudflare-image-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloudflare Image Proxy

This is an image proxy that saves you bandwidth by caching your images with Cloudflare workers. Works with Imgix, Cloudinary, and other image providers.

Usage

  1. Clone this repository:

    git clone https://github.com/wilsonhou/cloudflare-image-proxy.git
  2. Install dependencies:

    pnpm install
  3. Configure the worker:

    • Copy wrangler.toml.example to wrangler.toml.
    • Replace PROVIDER_URL in wrangler.toml with your image provider's domain, e.g., "<your-domain>.imgix.net" or "https://res.cloudinary.com/<your-cloudinary-account>/image".
  4. Develop and test the worker:

    pnpm run dev
  5. Deploy the worker to Cloudflare:

    pnpm run deploy

Credits

Inspired by Wes Bos's cloudflare-cloudinary-proxy.

License

Licensed under the MIT License.

About

💰 save bandwidth on imgix, cloudinary, etc. with cloudflare workers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published