# @types/imagemin

> TypeScript definitions for imagemin

Latest version **9.0.1** (published 2025-01-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/imagemin
pnpm add @types/imagemin
yarn add @types/imagemin
bun add @types/imagemin
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 9.0.1 |
| Published | 2025-01-17 |
| First published | 2018-08-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 1 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51438 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/imagemin
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/imagemin
- npm.io page: https://npm.io/package/@types/imagemin

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 9.0.1 (latest) — 2025-01-17
- 9.0.0 (ts4.9) — 2024-06-03
- 8.0.5 (ts4.5) — 2023-11-21
- 8.0.1 (ts4.3) — 2023-02-08
- 8.0.0 (ts3.8) — 2021-09-29
- 7.0.1 (ts3.6) — 2021-07-06
- 7.0.0 (ts2.9) — 2019-09-09
- 8.0.4 — 2023-11-07
- 8.0.3 — 2023-10-18
- 8.0.2 — 2023-10-10
- 6.0.0 — 2018-08-25

## README

# Installation
> `npm install --save @types/imagemin`

# Summary
This package contains type definitions for imagemin (https://github.com/imagemin/imagemin#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/imagemin.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/imagemin/index.d.ts)
````ts
/// <reference types="node" />

/**
 * @async
 */
declare function imagemin(input: readonly string[], options?: Options): Promise<Result[]>;

declare namespace imagemin {
    /**
     * @async
     */
    function buffer(data: Uint8Array, options?: BufferOptions): Promise<Uint8Array>;
}

export type Plugin = (input: Uint8Array) => Promise<Uint8Array>;

export interface Options {
    destination?: string | undefined;
    plugins: readonly Plugin[];
    glob?: boolean | undefined;
}

export interface Result {
    data: Uint8Array;
    sourcePath: string;
    destinationPath: string;
}

export interface BufferOptions {
    plugins: readonly Plugin[];
}

export default imagemin;

````

### Additional Details
 * Last updated: Fri, 17 Jan 2025 13:33:26 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Romain Faust](https://github.com/romain-faust), and [Jeff Chan](https://github.com/hkjeffchan).

---
_Source: https://npm.io/package/@types/imagemin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
