avifenc bin-wrapper that makes it seamlessly available as a local dependency
npm install @vheemstra/avifenc-bin> This is a bin wrapper for the AVIF encoder from AOMedia's libavif for use with imagemin and the imagemin-avifenc plugin.
You probably want the imagemin-avifenc plugin instead.
``shell`
npm install --save @vheemstra/avifenc-bin
`js
import {execFile} from 'node:child_process';
import avifenc from '@vheemstra/avifenc-bin';
execFile(avifenc, ['--output', 'output.avif', 'input.jpg'], err => {
if (err) {
throw err;
}
console.log('Image converted!');
});
`
`shell`
npm install --global @vheemstra/avifenc-bin
`shell``
avifenc --help
MIT © Imagemin
libavif © 2019 Joe Drago (Released under the BSD License.)
This package is made by Philip van Heemstra
Based on jpegtran-bin by Sindre Sorhus
This package uses libavif's official released binaries. Current version: 1.3.0