MCPcopy Index your code
hub / github.com/imagemin/imagemin

github.com/imagemin/imagemin @v9.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v9.0.1 ↗ · + Follow
2 symbols 26 edges 2 files 0 documented · 0% 4 cross-repo links updated 16mo agov9.0.1 · 2025-03-07★ 5,71879 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

imagemin

Minify images seamlessly

Install

npm install imagemin

Usage

import imagemin from 'imagemin';
import imageminJpegtran from 'imagemin-jpegtran';
import imageminPngquant from 'imagemin-pngquant';

const files = await imagemin(['images/*.{jpg,png}'], {
    destination: 'build/images',
    plugins: [
        imageminJpegtran(),
        imageminPngquant({
            quality: [0.6, 0.8]
        })
    ]
});

console.log(files);
//=> [{data: <Uint8Array 89 50 4e …>, destinationPath: 'build/images/foo.jpg'}, …]

API

imagemin(input, options?)

Returns Promise<object[]> in the format {data: Uint8Array, sourcePath: string, destinationPath: string}.

input

Type: string[]

File paths or glob patterns.

options

Type: object

destination

Type: string

Set the destination folder to where your files will be written. If no destination is specified, no files will be written.

plugins

Type: Array

The plugins to use.

glob

Type: boolean\ Default: true

Enable globbing when matching file paths.

imagemin.buffer(data, options?)

Returns Promise<Uint8Array>.

data

Type: Uint8Array

The image data to optimize.

options

Type: object

plugins

Type: Array

Plugins to use.

Related

Core symbols most depended-on inside this repo

imagemin
called by 10
index.js
handleFile
called by 1
index.js

Shape

Function 2

Languages

TypeScript100%

Modules by API surface

index.js2 symbols

Dependencies from manifests, versioned

ava6.1.2 · 1×
change-file-extension0.1.1 · 1×
del7.1.0 · 1×
environment1.0.0 · 1×
file-type19.0.0 · 1×
globby14.0.1 · 1×
image-dimensions2.3.0 · 1×
imagemin-jpegtran7.0.0 · 1×
imagemin-svgo11.0.1 · 1×
imagemin-webp8.0.0 · 1×
junk4.0.1 · 1×
ow2.0.0 · 1×

For agents

$ claude mcp add imagemin \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact