towebp CLI(google/zxエディション)
code:js
#!/usr/bin/env zx
const filepath = process.argv3
const filename = filepath.split('/')filepath.split('/').length - 1
const from = filepath.includes('/') ? filepath.replace(/${filename}, '') + '/' : ''
await $convert ${filepath} ${from}${filename.split('.')[0]}.webp
これでとりあえず使える。