Code from https://deno.com/blog/build-image-resizing-api

Useful for compressing an image before sending to chatgpt4v, for example