danielmorrisey.com/imrs
IMRS
IMRS, or Image Media Reduction System, is a simple tool that runs a Cloudflare Worker that converts any image URL that's publicly accessible into a transformed AVIF & WebP version of the image, which is then stored on the Cloudflare edge for 1 year. Its goal is to save on bandwidth and improve loading times.
try it
usage
Query parameter
Pass the image URL as a ?url= parameter.
Path passthrough
Append the full URL directly after the origin.
Format selection
Specify output format with ?type=. Defaults to AVIF; use webp for WebP.
In an HTML image tag
Wrap any src to serve AVIF automatically to supporting browsers.
how it works
You pass an image URL
Either via ?url= or as a path suffix. The URL must be a publicly accessible image. Optionally specify the output format with ?type=webp (defaults to AVIF).
The Worker fetches and transforms it
Cloudflare's image processing pipeline converts the image to your chosen format (AVIF or WebP) at 95% quality, scaled down to fit its original dimensions.
You get a cached image back
The response is served with Cache-Control: immutable, max-age=31536000 — one year at the edge. Subsequent requests for the same URL are instant.