Re:Issues with Cloudflare Images
by user-the-name on Tuesday December 07, 2021 @12:56PM
(#29475873)
Isn't that fit=crop?
[ Parent
| on HN ]
Re:Issues with Cloudflare Images
by LukeLambert on Tuesday December 07, 2021 @01:50PM
(#29476594)
fit=crop and fit=cover only work well if the source dimensions are greater than 512×512. If either dimension of the source is smaller, the behavior is useless.
fit=cover will return a square (as requested), but will enlarge it (which you never want because it wastes bandwidth).
fit=crop will cut off excess pixels if either dimension exceeds 512, but it does not always return a square. (And contrary to the docs, it does not behave like fit=scale-down.)