replicate/cloudflare-image-cache
TypeScript
Captured source
source ↗replicate/cloudflare-image-cache
Description: Use Cloudflare and Replicate to generate, cache, and serve images
Language: TypeScript
Stars: 9
Forks: 5
Open issues: 0
Created: 2024-12-16T03:00:52Z
Pushed: 2024-12-16T03:43:46Z
Default branch: main
Fork: no
Archived: no
README:
Cloudflare Image Cache
This repo contains a CloudFlare worker called "placeholder-zoo". The worker runs image generation models on Replicate, stores the output files in CloudFlare, and serves them with dynamic image resizing using Cloudflare Transformations.
👉 Follow the guide at https://replicate.com/docs/guides/cloudflare-image-cache
---
Prerequisites
- A Cloudflare account. You can sign up and run workers for free.
- A Replicate account
- Node.js 20 or later
- Git, for storing your code changes as you build.
Usage
Read the guide for step-by-step instructions to create this app, or jump right into using it with the commands below.
First, clone this repo:
git clone https://github.com/replicate/cloudflare-image-cache cd cloudflare-image-cache
Then, install dependencies:
npm install
Then, set up secrets for your worker. You'll need these secrets:
REPLICATE_API_TOKENCLOUDFLARE_ACCOUNT_IDCLOUDFLARE_API_TOKENCLOUDFLARE_IMAGE_ACCOUNT_HASH
Then run your worker locally:
npm run dev
Notability
notability 2.0/10Low stars, routine repo