🚀 DAY 2 OF LAUNCH WEEK: Unify Your Security Stack with Socket Basics.Learn more →
Socket
Book a DemoInstallSign in
Socket

@newsteam/imagemin

Package Overview
Dependencies
Maintainers
4
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@newsteam/imagemin

Preconfigured imagemin function

latest
Source
npmnpm
Version
0.0.33
Version published
Maintainers
4
Created
Source

@newsteam/imagemin

License npm package npm downloads Dependencies DevDependencies

This package provides a shared config for imagemin and several of its plugins.

Install

$ npm install imagemin

Usage

import imagemin from "@newsteam/imagemin";

(async () => {

  const files = await imagemin(['images/*.{jpg,png}'], 'build/images');

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

})();

API

imagemin(input, [output], [options])

Returns Promise<Object[]> in the format {data: Buffer, path: string}.

input

Type: string[]

Files to be optimized. See supported minimatch patterns.

output

Type: string

Maintenance

You can run tests with npm test.

Keywords

imagemin

FAQs

Package last updated on 09 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts