"fill" stretches to exactly width×height. "inside" preserves aspect ratio so the result fits within width×height.
property
Image.ResizeOptions.fit
fit?: 'fill' | 'inside'