@@ -71,7 +71,7 @@ function makeOptimizer(optimizerConfig, assetManager) {
7171 format,
7272 width,
7373 height,
74- keepRatio ,
74+ crop ,
7575 quality,
7676 scale,
7777 suffix
@@ -89,7 +89,7 @@ function makeOptimizer(optimizerConfig, assetManager) {
8989 targetDir,
9090 fingerprint,
9191 variant : {
92- autorotate, format, width, height, keepRatio , quality, scale, suffix
92+ autorotate, format, width, height, crop , quality, scale, suffix
9393 }
9494 } ) ;
9595 } ;
@@ -136,7 +136,7 @@ async function optimizeSVG(sourcePath) {
136136}
137137
138138async function optimizeBitmap ( sourcePath , format ,
139- { autorotate, width, height, scale, quality, keepRatio = true } ) {
139+ { autorotate, width, height, scale, quality, crop } ) {
140140 let image = sharp ( sourcePath ) ;
141141 if ( autorotate ) {
142142 image . rotate ( ) ;
@@ -148,7 +148,7 @@ async function optimizeBitmap(sourcePath, format,
148148 }
149149
150150 if ( width || height ) {
151- let fit = keepRatio ? "inside " : "cover " ;
151+ let fit = crop ? "cover " : "inside " ;
152152 image . resize ( { width : width , height : height , fit : sharp . fit [ fit ] } ) ;
153153 }
154154
0 commit comments