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.

Resized image
We will never be able to see tranformed images, no data is stored.

Query parameter

Pass the image URL as a ?url= parameter.

https://imrs.danielmorrisey.com?url=https://example.com/photo.jpg

Path passthrough

Append the full URL directly after the origin.

https://imrs.danielmorrisey.com/https://example.com/photo.jpg

Format selection

Specify output format with ?type=. Defaults to AVIF; use webp for WebP.

https://imrs.danielmorrisey.com?url=https://example.com/photo.jpg&type=webp

In an HTML image tag

Wrap any src to serve AVIF automatically to supporting browsers.

<img src="https://imrs.danielmorrisey.com/?url=https://example.com/photo.jpg">
1

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).

2

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.

3

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.