🔃 Format Conversion

Supported input formats

As stated elsewhere, (but we can't stress it enough) Edge-Resizer delegates to images.weserv.nl's API, and because of that, we're able to read from quite a few formats including, but not limited to, JPG, PNG, AVIF, GIF, TIFF, PDF, SVG, ICO, WEBP.

The following formats can be safely read, but you cannot use them as output:

ICOPDFHEICSVGAVIF
icopdfheigsvgavif

WARNING

Conversion from SVG can yield unexpected results when referencing non-standard fonts and not embedding them.

Output

(See 🔗 weserve's docs about output)

Using the output parameter, you can have the outcome transformed to jpg, png, gif, and webp formats. tiff format is also supported, but it can't be displayed inline. click to download the tiff output

When not specified, it defaults to the input format as long as it's among the former. Other formats that are valid inputs will gracefully fallback to supported output formats (mostly png and jpg tbh)

<zone>/w=150_output=jpg/riff.one/images/designcue-unsplash.jpg
Shorthand
<zone>/w=150_jpg/riff.one/images/designcue-unsplash.jpg
<zone>/w=150_output=png/riff.one/images/designcue-unsplash.jpg
Shorthand
<zone>/w=150_png/riff.one/images/designcue-unsplash.jpg
<zone>/w=150_output=gif/riff.one/images/designcue-unsplash.jpg
Shorthand
<zone>/w=150_gif/riff.one/images/designcue-unsplash.jpg
<zone>/w=150_output=webp/riff.one/images/designcue-unsplash.jpg
Shorthand
<zone>/w=150_webp/riff.one/images/designcue-unsplash.jpg

The "filename" parameter

Though we don't support the filename parameter (you still can pass it as query param) we send the proper header so that "save as" on a given file offers its name instead of a generic "image.png". The extension is taken from the content type so it's consistent across format conversions.

🔳 Edge Resizer Features

Compression/Optimization

pngjpgwebp
w=400 l=0 481kB
w=400 q=100 147kB
webp w=400 q=100 60kB
w=400 l=6 af 102kB
w=400 q=10 22kB
webp w=400 q=10 5.2kB