mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig.space.git
synced 2025-12-14 08:46:49 +00:00
🎉 Initial setup
🎉 Initial setup
Setup deployment
This commit is contained in:
14
tasks/optimize_images.js
Normal file
14
tasks/optimize_images.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const compress_images = require('compress-images')
|
||||
const input = 'compress/*.{jpg,png,svg,gif}'
|
||||
const output = 'compress/out/'
|
||||
|
||||
compress_images(input, output, { compress_force: true, statistic: true, autoupdate: false }, false,
|
||||
{ jpg: { engine: "mozjpeg", command: ["-quality", "60"] } },
|
||||
{ png: { engine: "pngquant", command: ["--quality=20-50", "-o"] } },
|
||||
{ svg: { engine: "svgo", command: "--multipass" } },
|
||||
{ gif: { engine: "gifsicle", command: ["--colors", "64", "--use-col=web"] } },
|
||||
(error, completed, statistic) => {
|
||||
if (error) console.error(error)
|
||||
if (statistic) console.log(statistic)
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user