mirror of
https://github.com/xuthus83/pigallery2.git
synced 2025-01-14 14:43:17 +08:00
Merge pull request #558 from sam365724/patch-1
Change from jpg to more efficient webp thumbnails
This commit is contained in:
commit
70d1a04e1b
@ -121,7 +121,7 @@ export class PhotoProcessing {
|
|||||||
return path.join(
|
return path.join(
|
||||||
ProjectPath.TranscodedFolder,
|
ProjectPath.TranscodedFolder,
|
||||||
ProjectPath.getRelativePathToImages(path.dirname(mediaPath)),
|
ProjectPath.getRelativePathToImages(path.dirname(mediaPath)),
|
||||||
file + '_' + size + '.jpg'
|
file + '_' + size + '.webp'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,7 +146,7 @@ export class PhotoProcessing {
|
|||||||
.digest('hex') +
|
.digest('hex') +
|
||||||
'_' +
|
'_' +
|
||||||
size +
|
size +
|
||||||
'.jpg'
|
'.webp'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ export class ImageRendererFactory {
|
|||||||
fit: 'cover',
|
fit: 'cover',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
await image.withMetadata().jpeg().toFile(input.outPath);
|
await image.withMetadata().webp({effort: 6, quality: 60}).toFile(input.outPath);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user