Nowadays APIs such as https://images.weserv.nl/ are capable of dinamically generating variations of a given source image address according to parameters defined in the URL. e.g, given the original image, transparent 800x600 png
https://riff.one/dice.png
Generating a variation such as a 384x128px thumbnail, right aligned, contain fitted, whitesmoke background, jpg format on https://images.weserv.nl/ would build up to a lenghty and complex URL:
https://images.weserv.nl/?a=right&bg=f5f5f5&fit=contain&h=128&output=jpg&url=ssl%3Ariff.one%2Fdice.png&w=384
Edge Resizer was created to relief you from the burden of this complexity providing compact, tidy and self-contained URLs that are resolved internally. Using Edge-Resizer, the above variation could be requested as
https://resizer.pictures/w=384_jpg_h=128_right_contain_bg=f5f5f5/riff.one/dice.png
These long lived variations are created through images.weserv.nl's API only when (and if) they are first requested, having further requests answer from Cloudflare's Edge Cache at blazing speeds.
Deploy to Cloudflare to use it with your custom domains:
Edge Resizer doesn't perform image manipulation nor persistence. It depends on
Cloudflare's Edge Cache to do the "Edge" part
images.weserv.nl's API for the "Resizer" part.
Without them, Edge Resizer would be pointless. Thank you guys, you're da real MVP ๐.
- ๐ Compact & tidy URLs
- ๐ Feature detection through Client Hints and other headers
- ๐ง sensible defaults and syntactic sugar
- ๐ Finer control of caches
- ๐ ...A cheap and amateurish version of Cloudflare Image Resizing
Throughout the documentation, a ribbon like the one below will be used to distinguish a feature, parameter,default or shortcut
that is non-standard to images.weserve.nl. |