A set of useful libraries for Edge Apps. Run locally, write tests, and integrate it into your deployment process. Move fast and maybe don't break things? Because, gosh darnit, you're an adult.
Middleware that automatically encodes images as webp for supported clients. This applies to requests with image/webp in the accept header and image/jpeg or image/png in the response type from the origin.
Removed the various URL transforms, changed function name to autoWebP, removed FetchFn and changed to FetchFunction, revised "Example" in auto-webp.ts. Still working on tests.
Middleware that automatically encodes images as webp for supported clients. This applies to requests with
image/webp
in the accept header andimage/jpeg
orimage/png
in the response type from the origin.(fixes #13)