RepoReplicateReplicatepublished Dec 16, 2024seen 5d

replicate/cloudflare-image-cache

TypeScript

Open original ↗

Captured source

source ↗
published Dec 16, 2024seen 5dcaptured 17hhttp 200method plain

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

---

!image

Prerequisites

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_TOKEN
  • CLOUDFLARE_ACCOUNT_ID
  • CLOUDFLARE_API_TOKEN
  • CLOUDFLARE_IMAGE_ACCOUNT_HASH

Then run your worker locally:

npm run dev

Notability

notability 2.0/10

Low stars, routine repo