I found that crop comes after resize in function Fill.
I think in the majority of cases the crop are much faster than resize. If we crop a big image to small one, then resize the small one, it might be slightly faster, since crop is image size irrelevant but resize is.
I don't get a chance to benchmark at this moment, maybe it's worth trying?
After took a look at: https://github.com/disintegration/imaging/blob/9458da53d1e65e098d48467a4317c403327e4424/resize.go#L273
I found that crop comes after resize in function Fill. I think in the majority of cases the crop are much faster than resize. If we crop a big image to small one, then resize the small one, it might be slightly faster, since crop is image size irrelevant but resize is.
I don't get a chance to benchmark at this moment, maybe it's worth trying?