Skip to content

Commit a68663e

Browse files
Fixed an error that caused the conversion to .heif to work incorrectly.
1 parent 5d207de commit a68663e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ export default function sharpOptimizeImages(options) {
7676
}
7777

7878
async function convert(file, newFileFormat, options) {
79+
if (newFileFormat == 'heif')
80+
options.compression = 'av1'
81+
7982
let sharpInstance =
8083
sharp(file.contents, DEFAULT_SHARP_OPTIONS)
8184
.toFormat(newFileFormat, Object.assign(DEFAULT_CONVERSION_OPTIONS, options))

0 commit comments

Comments
 (0)