# What changed in sharp-cli

> 22 changes in sharp-cli 5 to 6 from its official release notes, upgrade guides and advisories: 4 breaking, 15 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/sharp-cli/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## sharp-cli 6

### Breaking changes

- Tightens option configuration so options require values. (6.0.0) — [release notes](https://github.com/vseventer/sharp-cli/releases/tag/v6.0.0)
- Removes the jpg output format alias; use jpeg instead. (6.0.0) — [release notes](https://github.com/vseventer/sharp-cli/releases/tag/v6.0.0)
- Requires Node.js 20.10. (6.0.0) — [release notes](https://github.com/vseventer/sharp-cli/releases/tag/v6.0.0)

### New APIs and options

- Added an output template for preserving directories matched by glob inputs. (6.1.0) — [release notes](https://github.com/vseventer/sharp-cli/releases/tag/v6.1.0)
- The resize command now supports percentage-based dimensions. (6.1.0) — [release notes](https://github.com/vseventer/sharp-cli/releases/tag/v6.1.0)
- Adds an option to process images without writing output files. (6.0.0) — [release notes](https://github.com/vseventer/sharp-cli/releases/tag/v6.0.0)
- Adds an output option. (6.0.0) — [release notes](https://github.com/vseventer/sharp-cli/releases/tag/v6.0.0)
- Adds an output option for keeping a gain map. (6.0.0) — [release notes](https://github.com/vseventer/sharp-cli/releases/tag/v6.0.0)
- Adds an input option to limit input channels. (6.0.0) — [release notes](https://github.com/vseventer/sharp-cli/releases/tag/v6.0.0)
- Adds an option to print input and output metadata as JSON. (6.0.0) — [release notes](https://github.com/vseventer/sharp-cli/releases/tag/v6.0.0)
- Adds the --margin option to the trim command. (6.0.0) — [release notes](https://github.com/vseventer/sharp-cli/releases/tag/v6.0.0)
- Adds an output option. (6.0.0) — [release notes](https://github.com/vseventer/sharp-cli/releases/tag/v6.0.0)
- Adds an output option. (6.0.0) — [release notes](https://github.com/vseventer/sharp-cli/releases/tag/v6.0.0)
- Adds an output option for including a gain map. (6.0.0) — [release notes](https://github.com/vseventer/sharp-cli/releases/tag/v6.0.0)

### Fixes and other changes

- Fixes a bug where format options could cause errors. (6.0.0) — [release notes](https://github.com/vseventer/sharp-cli/releases/tag/v6.0.0)
- Adds graceful handling of partial failures during batch image processing. (6.0.0) — [release notes](https://github.com/vseventer/sharp-cli/releases/tag/v6.0.0)

## sharp-cli 5

### Breaking changes

- Version 5.3.0 is the last release compatible with Node.js 18. (5.3.0) — [release notes](https://github.com/vseventer/sharp-cli/releases/tag/v5.3.0)

### New APIs and options

- Added the --bigtiff output option. (5.3.0) — [release notes](https://github.com/vseventer/sharp-cli/releases/tag/v5.3.0)
- Added the dilate operation. (5.3.0) — [release notes](https://github.com/vseventer/sharp-cli/releases/tag/v5.3.0)
- Added the erode operation. (5.3.0) — [release notes](https://github.com/vseventer/sharp-cli/releases/tag/v5.3.0)
- Added the --keepDuplicateFrames output option. (5.3.0) — [release notes](https://github.com/vseventer/sharp-cli/releases/tag/v5.3.0)

### Fixes and other changes

- Fixed a bug that silently ignored numeric option values of zero, including --compressionLevel, --dither, --delay, and --effort. (5.3.0) — [release notes](https://github.com/vseventer/sharp-cli/releases/tag/v5.3.0)
