images-convert
v1.1.1
Published
Wrapper CLI for converting images to WebP, AVIF, SVG, and ICO using dedicated libraries.
Maintainers
Readme
images-convert
images-convert is a wrapper CLI package that integrates these libraries:
images-to-webp-cliimages-to-avif-cliimages-to-svgpng-to-ico
This package provides one unified command so you can convert images to WebP, AVIF, SVG, or ICO from a single entry point.
Install
npm install -g images-convertUsage
Global command:
images-convert <path> [path ...] <format> [options]Format
to-webpConvert images to WebP format.to-avifConvert images to AVIF format.to-svgConvert images to SVG format.to-icoConvert images to ICO format.
Options
--removeRemove original source file after successful conversion.-o, --output <dir>Output directory for converted files.-q, --quality <number>Quality for WebP/AVIF conversion (1-100, default80).
Examples
images-convert ./assets/photo.jpg to-webp
images-convert ./assets to-avif
images-convert ./a.jpg ./b.png ./folder-images to-avif --quality 75
images-convert ./assets/logo.png to-svg
images-convert ./assets/favicon.png to-ico
images-convert ./assets/photo.jpg to-avif --remove
images-convert ./assets/photo.jpg to-webp --quality 90
images-convert ./assets to-avif --output ./converted
images-convert ./assets/photo.jpg to-avif --quality 65 --output ./dist --removeNotes:
<path>can be one or many file/directory paths.<format>:to-webp,to-avif,to-svg,to-ico.- Supported source input files:
.jpg,.jpeg,.png. - For directory mode, files are read non-recursively from the selected folder.
--output <dir>writes converted files into a custom directory (created automatically if missing).--qualityis supported forto-webpandto-avifonly.--removedeletes original source file only when conversion succeeds.to-icosupports.jpg,.jpeg, and.pnginput.
