R2 Image Variants

Resize each image once with Cloudflare Images and serve srcset copies from R2. Install the native plugin from npm; this links to it.

Plugin

R2 Image Variants

Resize each image once with Cloudflare Images and serve srcset copies from R2. Install the native plugin from npm; this links to it.

  • Category: images
  • Status: available
  • Version: 0.1.1
  • Registry version: 0.1.0
  • Price: Unknown
  • Source: Official plugin registry, npm package
  • Install method: Native npm integration
  • Verified: 2026-10-21
  • Compatibility: Not stated in the public registry profile
  • Maintainer: RJS Tech Solutions LLP

Description

R2 Image Variants resizes each media image once with the Cloudflare Images binding, stores the copies in R2, and renders srcset URLs that point at them.

This Registry listing is not the plugin. Installing it from the Registry adds one information page to the admin and nothing else. R2 Image Variants itself is a native plugin, installed from npm:

npm install emdash-plugin-r2-variants

Why it must be native

The Registry lists sandboxed plugins only, and this plugin can’t run in the sandbox. It reads and writes R2 through the site’s bindings, resizes with the Images binding, and ships Astro components (Image and a Portable Text image block) that replace how images render. Those need a native plugin, registered in plugins: [] in astro.config.mjs.

Installation

Installing from the Registry adds an information page only; it does not resize any images. To get R2 Image Variants, install the native plugin from npm with npm install emdash-plugin-r2-variants and register it in plugins: [] in astro.config.mjs. Full setup, including the Cloudflare bindings it needs: README.