Resize images

This commit is contained in:
Mykola 2020-04-21 19:28:00 -07:00
parent 60482b57a5
commit 9c506a636e
2 changed files with 1 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 370 KiB

After

Width:  |  Height:  |  Size: 88 KiB

View File

@ -94,6 +94,7 @@ async function resize(srcWidth: number, srcHeight: number, path: string) {
}
export async function compressTinyPNG(path: string) {
console.log(`Compressing image via tinypng at path ${path}`)
const source = await tinify.fromFile(path);
await source.toFile(path);