In my experience, there are only two useful fit modes when resizing images for the web, and it appears Cloudflare is missing one of them.
Shrink to fit within a bounding box.
Use cases include content photos, galleries, and full-size product photos. Cloudflare calls this mode
Crop to a specified shape (aspect ratio) and maximum size, but never enlarge.
Use cases include profile photos (square), cover photos (extra-wide), thumbnail grids (square). I believe this should be the actual behavior of
cover. For instance, give me a thumbnail of size 512×512, but if the source image is 400×600, crop to 400×400 instead.
I have never found a need for server-side enlarging or letterboxing (e.g.
pad). That should be done client-side to save bandwidth. Am I missing something, or is there truly no way to guarantee a shape without enlarging?