cloudflare-sync

1.2.0 • Public • Published

This is a CLI tool to synchronise a local directory with Cloudflare Images.

Features

  • Syncs an entire directory, rather that 1 file at a time.
  • Skips files already uploaded.
  • Uses the relative filepath as the image ID, so the final CDN URLs are predictable.
  • Optionally resizes images before uploading, which speeds up Cloudflare's dynamic image resizing.

Installation

npm install -g cloudflare-sync

Usage

Ensure you have a CLOUDFLARE_API_TOKEN environment variable set. Then use the CLI:

npx cloudflare-sync --source ./public --resize 2000x2000 --resizeFit outside --account c495ed7f42a6ac8cb22cc3b822a684cb --ext jpg,png

Readme

Keywords

none

Package Sidebar

Install

npm i cloudflare-sync

Weekly Downloads

0

Version

1.2.0

License

ISC

Unpacked Size

8.37 kB

Total Files

5

Last publish

Collaborators

  • dlevs