by LukeLambert · 4y ago · 0 comments
Edit: Changed suggested name of fit mode for clarity.
Original: https://via.placeholder.com/400x600 Resized: https://gregbrimble.com/cdn-cgi/image/fit=scale-down,w=512,h...
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.)